Data Structures

Test your knowledge of data structures including trees, queues, sorting algorithms, and graph traversal

10 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Find the number of degree 2 node in a binary tree which is having n leaf nodes.

  1. n - 1
  2. 2n - 1
  3. n + 1
  4. 3n -1
  5. none of these
Question 2 Multiple Choice (Single Answer)

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

  1. linked List
  2. stack
  3. tree
  4. queue
  5. doubly linked list
Question 3 Multiple Choice (Single Answer)

Which of the following determine the efficiency of algorithms?

  1. Processor and memory
  2. Complexity and reliability
  3. Time and space
  4. Data and storage
  5. None of these
Question 4 Multiple Choice (Single Answer)

The Quick Sort algorithm is based upon the

  1. backtracking
  2. greedy
  3. dynamic programing
  4. linear programing
  5. divide and conquer
Question 5 Multiple Choice (Single Answer)

Name of the function which dynamically allocates the memory during the runtime.

  1. free( )
  2. malloc( )
  3. realloc( )
  4. Calloc( )
  5. Garbage
Question 6 Multiple Choice (Single Answer)

The type of sort in which the list of names is first sorted according to the first letter of each name is

  1. Bubble sort
  2. Quick sort
  3. Insertion sort
  4. Selection sort
  5. Radix sort
Question 7 Multiple Choice (Single Answer)

Which type of data structure operation is used to find out the location of the given record with the given key value?

  1. Traversing
  2. Searching
  3. Inserting
  4. Deleting
  5. Merging
Question 8 Multiple Choice (Single Answer)

What is the complexity of the bubble sort?

  1. O(n)
  2. O(logn)
  3. O(n2)
  4. O(nlogn)
  5. O(1)
Question 9 Multiple Choice (Single Answer)

Which of the following is the property of B+ tree?

  1. Each node has the maximum of M children and a minimum of M/2 children or any number from 2 to the maximum.
  2. Each node has one fewer keys than children with the maximum of M -1 keys.
  3. Keys are arranged in a defined order within the node.
  4. All the leaves are on the same level, i.e. there is no empty sub tree above the level of the leaves.
  5. All the leaves have been connected to form the linked list of the keys in a sequential order.
Question 10 Multiple Choice (Single Answer)

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?

  1. Floyd’s algorithm
  2. Dijkstra’s algorithm
  3. Prim’s algorithm
  4. Breadth First Search graph
  5. Connected graph