Data Structures

131. What is an external sorting algorithm?

  1. Algorithm that uses tape or disk during the sort
  2. Algorithm that uses main memory during the sort
  3. Algorithm that involves swapping
  4. Algorithm that are considered in place

Correct answer: (A)
Algorithm that uses tape or disk during the sort

132. What is the worst-case time for heap sort to sort an array of n elements?

  1. O(log n).
  2. O(n).
  3. O(n log n).
  4. O(nÂ2).

Correct answer: (C)
O(n log n).

133. When converting binary tree into extended binary tree, all the original nodes in binary tree are_________.

  1. internal nodes on extended tree.
  2. external nodes on extended tree.
  3. vanished on extended tree.
  4. post order traversal.

Correct answer: (A)
internal nodes on extended tree.

134. When does the ArrayIndexOutOfBoundsException occur?

  1. Compile-time
  2. Run-time
  3. Not an error
  4. None of the mentioned

Correct answer: (B)
Run-time

135. When elements are deleted the nodes go to_________.

  1. registers.
  2. free pool.
  3. recycle bin.
  4. gets deleted permanently.

Correct answer: (B)
free pool.

136. Which data structure allows deleting data elements from front and inserting at rear?

  1. Stacks.
  2. Queues.
  3. Dequeues.
  4. Binary search tree.

Correct answer: (B)
Queues

137. Which of the application may use a stack?

  1. Expression Evaluation
  2. Keeping track of local variables at run time.
  3. Syntax analyzer for a compiler
  4. All of the above.

Correct answer: (A)
Expression Evaluation

138. Which of the following case does not exist in complexity theory

  1. Best case
  2. Worst case
  3. Average case
  4. Null case

Correct answer: (D)
Null case

139. Which of the following conditions checks available free space in avail list?

  1. Avail=Top
  2. Null=Avail
  3. Avail=Null
  4. Avail=Max stack

Correct answer: (C)
Avail=Null

140. Which of the following data structure is linear data structure?

  1. Tree.
  2. Graph.
  3. Array.
  4. Linked list.

Correct answer: (C)
Array.

Page 14 of 15