Sunday, November 21, 2010

Data structure interview questions

Data Structures Interview Questions
1. What is linear and non-linear data structures?
2. what is the size of a void pointer ?

3. How is memory reserved using a declaration statement?

4. Data Structures declared as Volatile and Const

5. function f(x) is continuous

6. Data Structure - character that repeats itself

7. What would be the output of the following progam?union check{ char name[10]; int age;}A;void main(){ printf("Enter your name: "); scanf("%s",&A.name);printf("Enter your age: "); scanf("%d",&A.age);printf("Name=%s Age=%d",A.name,A.age);}

8. Why does the StackLinkedList class inherit the LinkedList class?

9. What are the various kinds of sorting techniques? Which is has least worst case?

10. What is hashing?

11. Why is it necessary to hash?

12. _____________ Memory is Volatile.

13. A Linked list can grow and shrink in size dynamically at _______.

14. Link list does not have any advantage when compared to an Array.

15. An _________ data type is a keyword of a programming language that specifies the amount of memory needed to store data and the kind of data that will be stored in that memory location.

16. What is nonvolatile memory?

17. data structures questions

18. the process of transforming one bit pattern into

19. What is the difference between declaration and definition?

20. How can a node be inserted in the middle of a linked list?
21. the way a card game player arranges his cards as he picks them up one by one, is an example of 1. bubble sort 2. selection sort 3. insertion sort 4. merge sort

22. The benefit of using a stack-linked list is that the number of nodes on the stack can increase or decrease as needed while the program runs.

23. Without using /,% and * operators. write a function to divide a number by 3.

24. if a function y=f ( x ) has an inverse function, then f ( x ) cannot be 1. symmetric about x-axis 2. an odd function 3. symmetric about y-axis 4. an even function

25. QueueLinkedList class inherit the LinkedList class.

26. What is the use of fflush() function?

27. The node in a single linked list can reference the previous node in the linked list.

28. which of the following symbol table implementation is based on the property of locality of reference ?

29. What is a Register?

30. ln E-R diagram 'the customer is paying his payment' The relationship is 1. one the many 2. many to one 3. one to one 4. none ofthese

31. Which of the following abstract data types are NOT used by Integer Abstract Data type group?

32. An array is a way to reference a series of memory locations using the ______.

33. What is a server and What is meant by server side implementation of com in Visual C++?

34. An application iterates the hashtable by calling the ______ and ______ member functions.

35. Data members of the Hashtable class stored in the private access specifier.

36. How many parts are there in a declaration statement?

37. What is a user-defined data type?

38. What happens when you push a new node onto a stack?

39. Boolean Expression

What is the difference bitween NULL AND VOID pointer?

41the anti-aliasing technique which allows shift of 1/4, 1/2 and 3/4 of a pixel diameter enabling a closer path of a line is 1. pixel phasing 2. filtering 3. intensity compensation 4. sampling technique

42. Fuzzy logic system rely on 1. crisp binary choices 2. ambiguous data 3. decision makers 4. all of them

43. which of the following is not primitive recursive but computable ?

44. what is the total number of equivalent relations that

45. Each entry in a link list is called a node TRUE or FALSE ?

46. the number of swappings needed to short the numbers 8, 22, 7, 9, 31, 19, 5, 13 in ascending order using bubble sort is 1. 11 2. 12 3. 13 4. 14

47. What is the difference between ARRAY and STACK?

48. what is abstract data type?

49. A hashtable is a table in which each entry consists of a hashed key and a value.

what is the size of char pointer (IN BYTES)
51. A stack-linked list is a data structure that uses a ______ to create a stack.

52. What is a leaf node?

53. The depth of a tree is the _______ of a tree.

54. Parent Node is also called as _____ Node.

55. A parent node is a node that branches into one or two other nodes, which are called child nodes.

56. What is a Tree?

57. The size of an array queue can change during runtime?

58. New nodes are added to the _____ of the queue.

59. LinkedList.h file is the header file that contains the definition of the Node structure and the definition of the LinkedList class.

60. Linked list C++ application is organized into three files.They are _____, ______ and _____.
61. The last member function is _____________.

62. The destructor is responsible for allocating all the memory that was allocated for the linked list.

63. What is the use of displayNodesReverse() member function?

64. Look at the following example LinkedList(){ front = NULL; back = NULL;}In this example, Both the front and back pointers are assigned a NULL value.

65. The ~Queue() member function is the Constructor ?

66. What is a linked list?

67. The dequeue process removes data from the front of the queue.

68. The isFull() member method is called within the enqueue process to determine ?

69. What is a queue ?

70. What is the purpose of the isEmpty() member method?
71. __________ Method removes the value from the top of a stack?

72. Popping removes an item from the stack.

73. _________ method places a value onto the top of a stack.

74. Allocating memory at runtime is also called as?

75. The symbol * is also called as _________________.

76. What does the symbol * signifies?

77. Pointer to a pointer is used in a program to ?

78. Why is the binary numbering system used in computing?

79. The size of a structure is determines by the Product of sizes of all primitive data types within the structure?

80. Define datastructure?
81. What is the difference between bubble sort & quick sort?

82. How do you overload Increment and decrement operators?

83. A pointer to a pointer is a variable whose value is an ________ of another _______ variable.

84. The size of a tree is the number of nodes on the tree?

85. The destroyList() member function deletes the contents of the linked list and ________________.

86. You have a new assignment to design and develop a database to track incoming and outgoing harcopy letters for your division. 35 employees are expected to use the database, ranging from clerical to managerial staff. BAsed on the information provided.What steps would you take to complete the assignment?Describe three or more exceptional features that you would design as part of the database?

87. _____ is the common programming technique used for hashing in all hashing functions.

88. How to reverse all the no using a single link list?

89. Why would you use a structure?

90. If the depth of a tree is 3 levels, then what is the Size of the Tree?
91. Node on a queue linked list have more than one data element.
92. Why is the constructor of the QueueLinkedList class empty?

93. 119 Let say that you need to access a particular node on a linked list, but yo
119 Let  say that you need to access a particular node on a linked list, but you dont know the reference to the node or the position the node has on the linked list, although you do know the data is stored in the node. You can locate the node by calling the _____ function.

94. A linked list index is ____ that represents the position of a node in a linked list.

95. The size of a queue linked list can change during runtime?

96. The front of the stack in a stack-linked list ______________.

97. Astack is a data structure that organizes data similar to how you organize dishes in a stack on your kitchen counter.
98. ________ is the maximum number of nodes that you can have on a stack-linked list.

99. What is the most efficient way of finding a loop in linklist?

100. Value of the first linked list index is _______.

2 comments:

  1. Hi Diptendra,

    I have read the questions provided by you. These are very helpful & you can make it more by adding answers with them. I hope will get it next time.

    Thanks,
    Ashok Kumar.

    ReplyDelete
  2. Thanks Ashok for your comment , Intentionaly I didnt provided answer here , you should check it in datastructure books , will help you to explore more in terms of knowledge in related comcepts .

    You can have this good pdf for datastructure learning
    http://diwww.epfl.ch/researchlgl/teaching/programming99_00/doc/algorithms.pdf

    Thanks

    ReplyDelete