Data Structure Interview Online Test
Technical interview questions and answers are the foundation of any Data Structure Interview because companies use DSA to test your problem-solving ability, logic building, and coding efficiency. Data Structures such as arrays, linked lists, stacks, queues, trees, and graphs form the backbone of programming, making this topic one of the most important parts of technical rounds. In campus placements and company-specific interviews conducted by TCS, Infosys, Wipro, Cognizant, and Capgemini, these questions decide whether a candidate has strong fundamentals. This guide covers the most important and frequently asked Data Structure interview questions with clear explanations, helping freshers and job seekers understand concepts easily. Preparing these questions improves performance in coding tests, whiteboard interviews, and online assessments.
Computer science professionals should complement their algorithmic knowledge with C language implementation and Java programming techniques
1. Calculate the efficiency of sequential search?
Answer: The number of comparisons depends on where the record with the argument key appears in the table
If it appears at first position then one comparison
If it appears at last position then n comparisons
Average=(n+1)/2 comparisons
Unsuccessful search n comparisons
Number of comparisons in any case is O (n).
Show Answer
Hide Answer
2. Can we apply binary search algorithm to a sorted linked list, why?
Answer: No we cannot apply binary search algorithm to a sorted linked list, since there is no way of indexing the middle element in the list. This is the drawback in using linked list as a data structure.
Show Answer
Hide Answer
3. Convert the expression ((A + B) * C - (D - E) ^ (F + G)) to equivalent Prefix and Postfix notations.
Answer: Prefix Notation:
^ - * +ABC - DE + FG
Postfix Notation:
AB + C * DE - - FG + ^
Show Answer
Hide Answer
4. Define circular list?
Answer: In linear list the next field of the last node contain a null pointer, when a next field in the last node contain a pointer back to the first node it is called circular list.
Advantages - From any point in the list it is possible to reach at any other point
Show Answer
Hide Answer
5. Define double linked list?
Answer: It is a collection of data elements called nodes, where each node is divided into three parts
i) An info field that contains the information stored in the node
ii) Left field that contain pointer to node on left side
iii) Right field that contain pointer to node on right side
Show Answer
Hide Answer
6. Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
Answer: No Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it does not mean that the distance between any two nodes involved in the minimum-spanning tree is minimum.
Show Answer
Hide Answer
7. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?
Answer: The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.
Show Answer
Hide Answer
8. In an AVL tree, at what condition the balancing is to be done?
Answer: If the 'pivotal value' (or the 'Height factor') is greater than 1 or less than -1.
Show Answer
Hide Answer
9. In RDBMS, what is the efficient data structure used in the internal storage representation?
Answer: B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier. This corresponds to the records that shall be stored in leaf nodes.
Show Answer
Hide Answer
10. Is any implicit arguments are passed to a function when it is called?
Answer: Yes there is a set of implicit arguments that contain information necessary for the function to execute and return correctly. One of them is return address which is stored within the function is data area, at the time of returning to calling program the address is retrieved and the function branches to that location.
Show Answer
Hide Answer
11. Is it necessary to sort a file before searching a particular item ?
Answer: If less work is involved in searching a element than to sort and then extract, then we don not go for sort
If frequent use of the file is required for the purpose of retrieving specific element, it is more efficient to sort the file.
Thus it depends on situation.
Show Answer
Hide Answer
12. List out few of the Application of tree data-structure?
Answer: The manipulation of Arithmetic expression,
Symbol Table construction,
Syntax analysis.
Show Answer
Hide Answer
13. List out few of the applications that make use of Multilinked Structures?
Answer: Sparse matrix, Index generation.
Show Answer
Hide Answer
14. List out the areas in which data structures are applied extensively?
Answer: Compiler Design,
Operating System,
Database Management System,
Statistical analysis package,
Numerical Analysis,
Graphics,
Artificial Intelligence,
Simulation
Show Answer
Hide Answer
15. Minimum number of queues needed to implement the priority queue?
Answer: Two. One queue is used for actual storing of data and another for storing priorities.
Show Answer
Hide Answer
16. Parenthesis is never required in Postfix or Prefix expressions, why?
Answer: Parenthesis is not required because the order of the operators in the postfix /prefix expressions determines the actual order of operations in evaluating the expression
Show Answer
Hide Answer
17. What actions are performed when a function is called?
Answer: What actions are performed when a function is called?
Ans: When a function is called
i) arguments are passed
ii) local variables are allocated and initialized
ii) transferring control to the function
Show Answer
Hide Answer
18. What actions are performed when a function returns?
Answer: i) Return address is retrieved
ii) Function is data area is freed
iii) Branch is taken to the return address
Show Answer
Hide Answer
19. What are the advantages of linked list over array (static data structure)?
Answer: The disadvantages of array are
i) unlike linked list it is expensive to insert and delete elements in the array
ii) One can not double or triple the size of array as it occupies block of memory space.
In linked list
i) each element in list contains a field, called a link or pointer which contains the address of the next element
ii) Successive element is need not occupy adjacent space in memory.
Show Answer
Hide Answer
20. What are the disadvantages array implementations of linked list?
Answer: i) The no of nodes needed can not be predicted when the program is written.
ii) The no of nodes declared must remain allocated throughout its execution
Show Answer
Hide Answer
21. What are the disadvantages of circular list?
Answer: i) We can not traverse the list backward
ii) If a pointer to a node is given we cannot delete the node
Show Answer
Hide Answer
22. What are the disadvantages of linear list?
Answer: i) We cannot reach any of the nodes that precede node (p)
ii) If a list is traversed, the external pointer to the list must be persevered in order to reference the list again
Show Answer
Hide Answer
23. What are the disadvantages of representing a stack or queue by a linked list?
Answer: i) A node in a linked list (info and next field) occupies more storage than a corresponding element in an array.
ii) Additional time spent in managing the available list.
Show Answer
Hide Answer
24. What are the disadvantages of sequential storage?
Answer: i) Fixed amount of storage remains allocated to the data structure even if it contains less element.
ii) No more than fixed amount of storage is allocated causing overflow
Show Answer
Hide Answer
25. What are the goals of Data Structure?
Answer: It must rich enough in structure to reflect the actual relationship of data in real world. The structure should be simple enough for efficient processing of data.
Show Answer
Hide Answer
26. What are the issues that hamper the efficiency in sorting a file?
Answer: The issues are
i) Length of time required by the programmer in coding a particular sorting program
ii) Amount of machine time necessary for running the particular program
iii)The amount of space necessary for the particular program .
Show Answer
Hide Answer
27. What are the major data structures used in the following areas : network data model & Hierarchical data model.
Answer: RDBMS - Array (i.e. Array of structures)
Network data model - Graph
Hierarchical data model - Trees
Show Answer
Hide Answer
28. What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms?
Answer: Polish and Reverse Polish notations.
Show Answer
Hide Answer
29. What do you mean by free pool?
Answer: Pool is a list consisting of unused memory cells which has its own pointer.
Show Answer
Hide Answer
30. What do you mean by garbage collection?
Answer: It is a technique in which the operating system periodically collects all the deleted space onto the free storage list.
It takes place when there is minimum amount of space left in storage list or when CPU is ideal.
The alternate method to this is to immediately reinsert the space into free storage list which is time consuming.
Show Answer
Hide Answer
31. What do you mean by overflow and underflow?
Answer: When new data is to be inserted into the data structure but there is no available space i.e. free storage list is empty this situation is called overflow.
When we want to delete data from a data structure that is empty this situation is called underflow.
Show Answer
Hide Answer
32. What do you mean by recursive definition?
Answer: The definition which defines an object in terms of simpler cases of itself is called recursive definition.
Show Answer
Hide Answer
33. What does abstract Data Type Mean?
Answer: That define the data type.
It is a useful tool for specifying the logical properties of a data type.
ADT consists of two parts
1) Values definition
2) Operation definition
Example:-The value definition for the ADT RATIONAL states that RATIONAL value consists of two integers, second does not equal to zero.
The operator definition for ADT RATIONAL includes the operation of creation (make rational) addition, multiplication and test for equality.
Show Answer
Hide Answer
34. What is a linked list?
Answer: A linked list is a linear collection of data elements, called nodes, where the linear order is given by pointers. Each node has two parts first part contain the information of the element second part contains the address of the next node in the list.
Show Answer
Hide Answer
35. What is a priority queue?
Answer: The priority queue is a data structure in which the intrinsic ordering of the elements (numeric or alphabetic)
Determines the result of its basic operation. It is of two types
Show Answer
Hide Answer
36. What is a queue?
Answer: A queue is an ordered collection of items from which items may be deleted at one end (front end) and items inserted at the other end (rear end). It obeys FIFO rule there is no limit to the number of elements a queue contains.
Show Answer
Hide Answer
37. What is a spanning Tree?
Answer: A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized.
Show Answer
Hide Answer
38. What is dangling pointer and how to avoid it?
Answer: After a call to free(p) makes a subsequent reference to *p illegal, i.e. though the storage to p is freed but the value of p(address) remain unchanged .so the object at that address may be used as the value of *p (i.e. there is no way to detect the illegality).Here p is called dangling pointer.
To avoid this it is better to set p to NULL after executing free(p).The null pointer value does not reference a storage location it is a pointer that does not point to anything.
Show Answer
Hide Answer
39. What is data structure?
Answer: The logical and mathematical model of a particular organization of data is called data structure. There are two types of data structure i) Linear ii) Nonlinear
Show Answer
Hide Answer
40. What is sequential search?
Answer: Ans: In sequential search each item in the array is compared with the item being searched until a match occurs. It is applicable to a table organized either as an array or as a linked list.
Show Answer
Hide Answer
41. What is the data structures used to perform recursion?
Answer: Stack. Because of its LIFO (Last In First Out) property it remembers its 'caller' so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.
Show Answer
Hide Answer
42. What is the difference between a Stack and an Array?
Answer: i) Stack is a ordered collection of items
ii) Stack is a dynamic object whose size is constantly changing as items are pushed and popped .
iii) Stack may contain different data types
iv) Stack is declared as a structure containing an array to hold the element of the stack, and an integer to indicate the current stack top within the array.
ARRAY
i) Array is an ordered collection of items
ii) Array is a static object i.e. no of item is fixed and is assigned by the declaration of the array
iii) It contains same data types.
iv) Array can be home of a stack i.e. array can be declared large enough for maximum size of the stack.
Show Answer
Hide Answer
43. What is the type of the algorithm used in solving the 8 Queens problem?
Answer: Backtracking
Show Answer
Hide Answer
44. Whether Linked List is linear or Non-linear data structure?
Answer: According to Storage Linked List is a Non-linear one.
Show Answer
Hide Answer
45. If you are using C language to implement the heterogeneous linked list, what pointer
type will you use?
Answer: The heterogeneous linked list contains different data types in its nodes and we
need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So
we go for void pointer. Void pointer is capable of storing pointer to any type as it is a
generic pointer type.
Show Answer
Hide Answer
46. Minimum number of queues needed to implement the priority queue?
Answer: Two. One queue is used for actual storing of data and another for storing
priorities.
Show Answer
Hide Answer
47. What is the data structures used to perform recursion?
Answer: Stack. Because of its LIFO (Last In First Out) property it remembers its ‘caller so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls.
Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.
Show Answer
Hide Answer
48. What are the notations used in Evaluation of Arithmetic Expressions using prefix and
postfix forms?
Answer: Polish and Reverse Polish notations.
Show Answer
Hide Answer
49. Sorting is not possible by using which of the following methods?
Answer: (a) Insertion
(b) Selection
(c) Exchange
(d) Deletion
(d) Deletion.
Using insertion we can perform insertion sort, using selection we can perform
selection sort, using exchange we can perform the bubble sort (and other similar sorting
methods). But no sorting method can be done just using deletion.
Show Answer
Hide Answer
50. What are the methods available in storing sequential files ?
Answer: Straight merging,
Natural merging,
Polyphase sort,
Distribution of Initial runs.
Show Answer
Hide Answer
51. List out few of the Application of tree data-structure?
Answer: The manipulation of Arithmetic expression,
Symbol Table construction,
Syntax analysis.
Show Answer
Hide Answer
52. List out few of the applications that make use of Multilinked Structures?
Answer: Sparse matrix,
Index generation.
Show Answer
Hide Answer
53. In tree construction which is the suitable efficient data structure?
Answer: (a) Array ( b ) Linked list ( c ) Stack ( d ) Queue (e) none
(b) Linked list
Show Answer
Hide Answer
54. What is the type of the algorithm used in solving the 8 Queens problem?
Answer: Backtracking
Show Answer
Hide Answer
55. In an AVL tree, at what condition the balancing is to be done?
Answer: If the ‘pivotal value (or the ‘Height factor) is greater than 1 or less than 1.
Show Answer
Hide Answer
56. What is the bucket size, when the overlapping and collision occur at same time?
Answer: One. If there is only one entry possible in the bucket, when the collision occurs, there is no way to accommodate the colliding value. This results in the overlapping of values.
Show Answer
Hide Answer
57. Classify the Hashing Functions based on the various methods by which the key value is found.
Answer: Direct method,
Subtraction method,
Modulo-Division method,
Digit-Extraction method,
Mid-Square method,
Folding method,
Pseudo-random method.
Show Answer
Hide Answer
58. What are the types of Collision Resolution Techniques and the methods used in each of the type?
Answer: Open addressing (closed hashing),
The methods used include:
Overflow block,
Closed addressing (open hashing)
The methods used include:
Linked list,
Binary tree…
Show Answer
Hide Answer
59. In RDBMS, what is the efficient data structure used in the internal storage representation?
Answer: B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier. This corresponds to the records that shall be stored in leaf nodes.
Show Answer
Hide Answer
60. What is a spanning Tree?
Answer: A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized.
Show Answer
Hide Answer
61. Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
Answer: No.Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it doesn't mean that the distance between any two nodes involved in the minimum-spanning tree is minimum.
Show Answer
Hide Answer
62. Which is the simplest file structure?
Answer: (a) Sequential
(b) Indexed
(c) Random
(d) Sequential
Show Answer
Hide Answer
63. Whether Linked List is linear or Non-linear data structure?
Answer: According to Access strategies Linked list is a linear one.
According to Storage Linked List is a Non-linear one.
Show Answer
Hide Answer
64. What is the difference between a Stack and an Array?
Answer: i) Stack is a ordered collection of items
ii) Stack is a dynamic object whose size is constantly changing as items are pushed and popped .
iii) Stack may contain different data types
iv) Stack is declared as a structure containing an array to hold the element of the stack, and an integer to indicate the current stack top within the array.
ARRAY
i) Array is an ordered collection of items
ii) Array is a static object i.e. no of item is fixed and is assigned by the declaration of the array
i
Show Answer
Hide Answer
65. What do you mean by recursive definition?
Answer: The definition which defines an object in terms of simpler cases of itself is called recursive definition.
Show Answer
Hide Answer
66. What is sequential search?
Answer: In sequential search each item in the array is compared with the item being searched until a match occurs. It is applicable to a table organized either as an array or as a linked list.
Show Answer
Hide Answer
67. What actions are performed when a function is called?
Answer: When a function is called
i) arguments are passed
ii) local variables are allocated and initialized
ii) transferring control to the function
Show Answer
Hide Answer
68. What actions are performed when a function returns?
Answer: i) Return address is retrieved
ii) Functions data area is freed
iii) Branch is taken to the return address
Show Answer
Hide Answer
69. What is a linked list?
Answer: A linked list is a linear collection of data elements, called nodes, where the linear order is given by pointers. Each node has two parts first part contain the information of the element second part contains the address of the next node in the list.
Show Answer
Hide Answer
70. What are the advantages of linked list over array (static data structure)?
Answer: The disadvantages of array are
i) unlike linked list it is expensive to insert and delete elements in the array
ii) One cant double or triple the size of array as it occupies block of memory space.
In linked list
Show Answer
Hide Answer
71. What are the advantages of linked list over array (static data structure)?
Answer: The disadvantages of array are
i) unlike linked list it is expensive to insert and delete elements in the array
ii) One cant double or triple the size of array as it occupies block of memory space.
In linked list
i) each element in list contains a field, called a link or pointer which contains the address of the next element
ii) Successive elements need not occupy adjacent space in memory.
Show Answer
Hide Answer
72. Can we apply binary search algorithm to a sorted linked list, why?
Answer: No we cannot apply binary search algorithm to a sorted linked list, since there is no way of indexing the middle element in the list. This is the drawback in using linked list as a data structure.
Show Answer
Hide Answer
73. What do you mean by free pool?
Answer: Pool is a list consisting of unused memory cells which has its own pointer.
Show Answer
Hide Answer
74. What do you mean by garbage collection?
Answer: It is a technique in which the operating system periodically collects all the deleted space onto the free storage list.
It takes place when there is minimum amount of space left in storage list or when CPU is ideal.
The alternate method to this is to immediately reinsert the space into free storage list which is time consuming.
Show Answer
Hide Answer
75. What do you mean by overflow and underflow?
Answer: When new data is to be inserted into the data structure but there is no available space i.e. free storage list is empty this situation is called overflow.
When we want to delete data from a data structure that is empty this situation is called underflow.
Show Answer
Hide Answer
76. What are the disadvantages array implementations of linked list?
Answer: i) The no of nodes needed cant be predicted when the program is written.
ii) The no of nodes declared must remain allocated throughout its execution
Show Answer
Hide Answer
77. What is a queue?
Answer: A queue is an ordered collection of items from which items may be deleted at one end (front end) and items inserted at the other end (rear end).
It obeys FIFO rule there is no limit to the number of elements a queue contains.
Show Answer
Hide Answer
78. What is a priority queue?
Answer: The priority queue is a data structure in which the intrinsic ordering of the elements (numeric or alphabetic)
Determines the result of its basic operation. It is of two types
i) Ascending priority queue- Here smallest item can be removed (insertion is arbitrary)
ii) Descending priority queue- Here largest item can be removed (insertion is arbitrary)
Show Answer
Hide Answer
79. What are the disadvantages of sequential storage?
Answer: i) Fixed amount of storage remains allocated to the data structure even if it contains less element.
ii) No more than fixed amount of storage is allocated causing overflow
Show Answer
Hide Answer
80. What are the disadvantages of representing a stack or queue by a linked list?
Answer: i) A node in a linked list (info and next field) occupies more storage than a corresponding element in an array.
ii) Additional time spent in managing the available list.
Show Answer
Hide Answer
81. What is dangling pointer and how to avoid it?
Answer: After a call to free(p) makes a subsequent reference to *p illegal, i.e. though the storage to p is freed but the value of p(address) remain unchanged .so the object at that address may be used as the value of *p (i.e. there is no way to detect the illegality).Here p is called dangling pointer.
To avoid this it is better to set p to NULL after executing free(p).The null pointer value doesnt reference a storage location it is a pointer that doesnt point to anything.
Show Answer
Hide Answer
82. What are the disadvantages of linear list?
Answer: i) We cannot reach any of the nodes that precede node (p)
ii) If a list is traversed, the external pointer to the list must be persevered in order to reference the list again
Show Answer
Hide Answer
83. Define circular list?
Answer: In linear list the next field of the last node contain a null pointer, when a next field in the last node contain a pointer back to the first node it is called circular list.
Advantages From any point in the list it is possible to reach at any other point
Show Answer
Hide Answer
84. What are the disadvantages of circular list?
Answer: i) We cant traverse the list backward
ii) If a pointer to a node is given we cannot delete the node
Show Answer
Hide Answer
85. Define double linked list?
Answer: It is a collection of data elements called nodes, where each node is divided into three parts
i) An info field that contains the information stored in the node
ii) Left field that contain pointer to node on left side
iii) Right field that contain pointer to node on right side
Show Answer
Hide Answer
86. Is it necessary to sort a file before searching a particular item ?
Answer: If less work is involved in searching a element than to sort and then extract, then we dont go for sort
If frequent use of the file is required for the purpose of retrieving specific element, it is more efficient to sort the file.
Thus it depends on situation.
Show Answer
Hide Answer
87. What are the issues that hamper the efficiency in sorting a file?
Answer: The issues are
i) Length of time required by the programmer in coding a particular sorting program
ii) Amount of machine time necessary for running the particular program
iii)The amount of space necessary for the particular program .
Show Answer
Hide Answer
88. Calculate the efficiency of sequential search?
Answer: The number of comparisons depends on where the record with the argument key appears in the table
If it appears at first position then one comparison
If it appears at last position then n comparisons
Average=(n+1)/2 comparisons
Unsuccessful search n comparisons
Number of comparisons in any case is O (n).
Show Answer
Hide Answer
89. Is any implicit arguments are passed to a function when it is called?
Answer: Yes there is a set of implicit arguments that contain information necessary for the function to execute and return correctly. One of them is return address which is stored within the functions data area, at the time of returning to calling program the address is retrieved and the function branches to that location.
Show Answer
Hide Answer
90. Parenthesis is never required in Postfix or Prefix expressions, why?
Answer: Parenthesis is not required because the order of the operators in the postfix /prefix expressions determines the actual order of operations in evaluating the expression
Show Answer
Hide Answer
91. What are the major data structures used in the following areas : network data model & Hierarchical data model.
Answer: RDBMS Array (i.e. Array of structures)
Network data model Graph
Hierarchical data model Trees
Show Answer
Hide Answer
92. If you are using C language to implement the heterogeneous linked list, what pointer type will you use?
Answer: The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.
Show Answer
Hide Answer
93. Minimum number of queues needed to implement the priority queue?
Answer: Two. One queue is used for actual storing of data and another for storing priorities.
Show Answer
Hide Answer
94. What is the data structures used to perform recursion?
Answer: Stack. Because of its LIFO (Last In First Out) property it remembers its ‘caller so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls.
Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.
Show Answer
Hide Answer
95. What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms?
Answer: Polish and Reverse Polish notations.
Show Answer
Hide Answer
96. Convert the expression ((A + B) * C (D E) ^ (F + G)) to equivalent Prefix and Postfix notations.
Answer: Prefix Notation:
^ * +ABC DE + FG
Postfix Notation:
AB + C * DE FG + ^
Show Answer
Hide Answer
97. Sorting is not possible by using which of the following methods?
Answer: Deletion.
Show Answer
Hide Answer
98. List out few of the Application of tree data-structure?
Answer: The manipulation of Arithmetic expression,
Symbol Table construction,
Syntax analysis.
Show Answer
Hide Answer
99. List out few of the applications that make use of Multilinked Structures?
Answer: Sparse matrix, Index generation.
Show Answer
Hide Answer
100. in tree construction which is the suitable efficient data structure?
Answer: Linked list
Show Answer
Hide Answer
101. There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree?
Answer: 15
Show Answer
Hide Answer
102. There are 8, 15, 13, 14 nodes were there in 4 different trees. Which of them could have formed a full binary tree?
Answer: 15
In general:
There are 2n-1 nodes in a full binary tree.
By the method of elimination:
Full binary trees contain odd number of nodes. So there cannot be full binary trees with 8 or 14 nodes, so rejected. With 13 nodes you can form a complete binary tree but not a full binary tree. So the correct answer is 15.
Note: Full and Complete binary trees are different. All full binary trees are complete binary trees but not vice versa.
Show Answer
Hide Answer
103. In RDBMS, what is the efficient data structure used in the internal storage representation?
Answer: B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier. This corresponds to the records that shall
be stored in leaf nodes.
Show Answer
Hide Answer
104. One of the following tree structures, which is, efficient considering space and time complexities?
a) Incomplete Binary Tree.
b) Complete Binary Tree.
c) Full Binary Tree.
Answer: b) Complete Binary Tree.
By the method of elimination:
Full binary tree loses its nature when operations of insertions and deletions are done. For incomplete binary trees,
extra property of complete binary tree is maintained even after operations like additions and deletions are done on it.
Show Answer
Hide Answer
105. What is a spanning Tree?
Answer: A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized.
Show Answer
Hide Answer
106. Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
Answer: No.
Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it doesnt mean that the distance between any two nodes involved in the minimum-spanning tree is minimum.
Show Answer
Hide Answer
107. Whether Linked List is linear or Non-linear data structure?
Answer: According to Storage Linked List is a Non-linear one.
Show Answer
Hide Answer
108. Can+You+Use+Frequency+Capping+On+The+Search+Network%3f
Answer: No%2c+this+feature+is+available+only+for+ads+on+the+Display+Network.
Show Answer
Hide Answer