Data Structures
Test your knowledge of data structures including trees, queues, sorting algorithms, and graph traversal
Questions
Find the number of degree 2 node in a binary tree which is having n leaf nodes.
- n - 1
- 2n - 1
- n + 1
- 3n -1
- none of these
The type of linear data structure in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a
- linked List
- stack
- tree
- queue
- doubly linked list
Which of the following determine the efficiency of algorithms?
- Processor and memory
- Complexity and reliability
- Time and space
- Data and storage
- None of these
The Quick Sort algorithm is based upon the
- backtracking
- greedy
- dynamic programing
- linear programing
- divide and conquer
Name of the function which dynamically allocates the memory during the runtime.
- free( )
- malloc( )
- realloc( )
- Calloc( )
- Garbage
The type of sort in which the list of names is first sorted according to the first letter of each name is
- Bubble sort
- Quick sort
- Insertion sort
- Selection sort
- Radix sort
Which type of data structure operation is used to find out the location of the given record with the given key value?
- Traversing
- Searching
- Inserting
- Deleting
- Merging
What is the complexity of the bubble sort?
- O(n)
- O(logn)
- O(n2)
- O(nlogn)
- O(1)
Which of the following is the property of B+ tree?
- Each node has the maximum of M children and a minimum of M/2 children or any number from 2 to the maximum.
- Each node has one fewer keys than children with the maximum of M -1 keys.
- Keys are arranged in a defined order within the node.
- All the leaves are on the same level, i.e. there is no empty sub tree above the level of the leaves.
- All the leaves have been connected to form the linked list of the keys in a sequential order.
The traversal in which one node is selected as the start point. It is visited and marked, then all unvisited nodes adjacent to the next nodes are visited and marked in the some sequential order. Finally , the unvisited nodes immediately adjacent to these nodes are visited and marked and so forth, until the entire edges are traversed. This type of searching occurs in which of the following algorithms?
- Floyd’s algorithm
- Dijkstra’s algorithm
- Prim’s algorithm
- Breadth First Search graph
- Connected graph