Analysis of Algorithms and Computational Complexity Questions and Answers

Practice Mode
Showing 10 of 239 questions
Q181
Traversing a binary tree first root and then left and right subtrees called ____ traversal.
  • A postorder
  • B preorder
  • C inorder
  • D none of these
Answer: Option D
Q182
Identify the true statements regarding insertion of node in a linear linked list. I. Setting the field of the new node means allocating memory to newly created node II. If the node precedes all others in the list, then insert it at the front and return its address III. Creating a new node depends upon free memory space IV. The node number where insertion to be taken place, must be known prior to the insertion.
  • A (i), (ii) and (iii)
  • B (ii), (iii), and (iv)
  • C (i) and (ii)
  • D (ii) and (iii)
Answer: Option A
Q183
Which of the following statements are true about a doubly linked list ? I. it may be either linear or circular II. it must contain a header node III. it will occupy same memory space as that of linear linked list, both having same number of nodes
  • A only (i)
  • B (ii) and (iii)
  • C (i), (ii) and (iii)
  • D (i) and (iii)
Answer: Option A
Q184
Identity the steps to be taken when a first node is to be deleted from linear linked list. I. Set link of start pointer to the second node in the list II. Free the space associated with first node III. Obtain the address of the second node in the list III. Obtain the address of the second node in the list IV. Count the number of nodes in the list
  • A (i) and (ii)
  • B (i), (ii) and (iii)
  • C (ii) and (iii)
  • D (i), (ii), (iii), and (iv)
Answer: Option A
Q185
What can be said about the array representation of a circular queue when it contains only one element ?
  • A front = rear = Null
  • B front = Rear + 1
  • C front = Rear -1
  • D front = rear = Null
Answer: Option D
Q186
Which of the following statements are correct ? I. If each tree node contains a father field, then it's not necessary to use either stack or threads II. Traversal using father pointers is more time efficient than traversal of a threaded tree III. a in-thread binary tree is defined as binary tree that is both left-in threaded and right-in threaded.
  • A (i),(ii) and (iii)
  • B (i) and (iii)
  • C (ii) and (iii)
  • D none of these
Answer: Option B
Q187
To sort many large object or structures, it would be most efficient to
  • A place reference to them in and array an sort the array
  • B place them in a linked list and sort the linked list
  • C place pointers to them in an array and sort the array
  • D place them in an array and sort the array
Answer: Option C
Q188
In a linked list
  • A (a) each link contains a pointer tto the next link
  • B an array of pointers point to the links
  • C each link contains data or pointer to data
  • D the links are stored in an array
Answer: Option A
Q189
If you want to sort many large objects or structures, it would be most efficient to place
  • A them in an array and sort the array
  • B pointers to them in an array and sort the array
  • C them in a linked list and sort the linked list
  • D references to them in an array and sort the array
Answer: Option B
Q190
Running out of memory may occur due to
  • A non-recursive functrion call
  • B recursive function call
  • C use of more global variable
  • D none of these
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test