Advanced Data Structure and Algorithms mcq with answer

Q1. The memory of a computer is simply a group of —-
Answer: bits

Q2. A —- is typically a large list that is stored in the external memory of a computer.
Answer: file

Q3. An —- is an ordered set which contains a fixed number of objects
Answer: array

Q4. —- is a combination of one or more basic data types to form a single addressable data type along with operations defi ned on it.
Answer: Data structure

Q5. Adding new records to the structure is known as —-
Answer: Inserting

Q6. An array is an example of list.
(a) True
(b) False
Answer: (a) True

Q7. Linked lists can not use the concept of dynamic memory allocation.
(a) True
(b) False
Answer: (b) False

Q8. Each element of the list is called a node and consists of two or more members.
(a) True
(b) False
Answer: (a) True

Q9. At machine level, the data is stored as strings containing 1’s and 0’s.
(a) True
(b) False
Answer: (a) True

Q10. A tool to specify the logical properties of a data type is Abstract Data Type.
(a) True
(b) False
Answer: (a) True

Q11. Pointers permit the referencing of structures in a
(a) Normal way
(b) Uniform way
(c) Common way
(d) None
Answer: (b) Uniform way

Q12. A recursive data structure is a data structure that has the same form regardless of the
(a) Size of the data
(b) Shape of the data
(c) Origin of the data
(d) Form of the data
Answer: (a) Size of the data

Q13. The insert function takes a pointer to an existing list as the
(a) Second parameter
(b) Third parameter
(c) First parameter
(d) None
Answer: (c) First parameter

Q14. A Circular Linked List has no
(a) Beginning and no mid point
(b) End and last
(c) Beginning and beginning
(d) Beginning and no end
Answer: (d) Beginning and no end

Q15. Memory allocation in Linked Lists is —-
Answer: Dynamic

Q16. Linked list stores two items of information: —- and —-
Answer: An element of the list, A link or address of another node

Q17. An — function is used to create the list.
Answer: Insert

Q18. A —- is a list of elements in which the elements of the list can be placed anywhere in memory.
Answer: Linked list

Q19. We cannot insert a node after any specific node.
(a) True
(b) False
Answer: (b) False

Q20. In the single linked list each node provides information about where the previous node is in the list.
(a) True
(b) False
Answer: (b) False

Q21. A linked list is not a recursive data structure.
(a) True
(b) False
Answer: (b) False

Q22. Basic method of implementation of stack are:
(a) Where the memory is used statically
(b) Where the memory is used dynamically
(c) Both of the above
(d) None of the above
Answer: (c) Both of the above

Q23. A stack operation that removes an element from the stack
(a) Pop
(b) Push
(c) LIFO
(d) FIFO
Answer: (a) Pop

Q24. The infi x of a particular element is x + y what is the prefi x of this
(a) x + y+
(b) +xy
(c) xy+
(d) None of the above
Answer: (b) +xy

Q25. The hardware component known as an input device is:
(a) RAM
(b) Hard-disk
(c) Monitor
(d) Processor
(e) Keyboard
Answer: (e) Keyboard

Q26. The hardware component known as an output device is:
(a) Keyboard
(b) Monito
(c) RAM
(d) Hard-disk
(e) Processor
Answer: (b) Monito

Q27. CPU stands for
(a) Control processing unit
(b) Central processing unit
(c) Central programming unit
(d) None of these
Answer: (b) Central processing unit

Q28. Stack is said to possess —- property.
Answer: LIFO (Last In First Out)

Q29. —- is used to implement stacks where the memory is used statically.
Answer: Array

Q30. Pointers help in —- implementation of stacks.
Answer: Dynamic

Q31. In —- the operators come before operands.
Answer: Polish Notation

Q32. Priority queue is a
(a) Collection of elements such that each element has been assigned a priority
(b) Collection of I/O devices
(c) Collection of FIFO
(d) None of the above
Answer: (a) Collection of elements such that each element has been assigned a priority

Q33. Every insertion implies that the rear of the queue increases by 1 except when rear =.
(a) n-2
(b) n-1
(c) n-0
(d) n-3
Answer: (b) n-1

Q34. During the initialization of a queue q, its front and rear are made to —-
Answer: 0

Q35. A more efficient queue representation is obtained by regarding the array of elements of a queue to be —-
Answer: circular

Q36. A queue could be implemented using a —-
Answer: linked list

Q37. Reverse Polish Notation is also called —-
Answer: Postfix Notation

Q38. —- is used in time-sharing multi-user systems where programs of high priority are processed first amid programs with the same priority form a standard queue.
Answer: Priority Queue

Q39. A queue exhibits the —- property.
Answer: FIFO (First In First Out)

Q40. A queue could be implemented using —- and —-
Answer: Array, Linked List

Q41. A —- is a collection of elements such that each element has been assigned a priority.
Answer: Priority queue

Q42. What is the degree of node E
Advanced Data Structure And Algorithms image1
(a) 3
(b) 2
(c) 1
(d) 0
Answer: (d) 0

Q43. What is the degree of node C
Advanced Data Structure And Algorithms image1
(a) 4
(b) 2
(c) 1
(d) 3
Answer: (b) 2

Q44. What is the level of node A
Advanced Data Structure And Algorithms image1
(a) 1
(b) 0
(c) 3
(d) 4
Answer: (a) 1

Q45. What is the level of node H
Advanced Data Structure And Algorithms image1
(a) 2
(b) 3
(c) 4
(d) 0
Answer: (b) 3

Q46. To delete a node from a binary search tree the method to be used depends on —-
Answer: number of children for the node to be deleted

Q47. The order LDR is called —- the order LRD is called —- and the order DLR is called —-
Answer: inorder, postorder, preorder

Q48. Binary tree is a special type of tree having degree —-
Answer: 2

Q49. A degree three tree is called a —- tree.
Answer: ternary

Q50. A node with degree zero is called a —- node.
Answer: terminal/leaf

Q51. A binary tree of depth k can have maximum 2k-1 number of nodes.
(a) True
(b) False
Answer: (a) True

Q52. For a binary tree, maximum number of nodes at level i is 2*i-1.
(a) True
(b) False
Answer: (a) True

Q53. A full binary tree is a binary of depth k having 2k – 1 nodes. If it has < 2k – 1, it is not a full binary tree.
(a) True
(b) False
Answer: (a) True

Q54. A binary search tree is not a binary tree which may be full, and every node contains an identifi er.
(a) True
(b) False
Answer: (b) False

Q55. A dictionary is an ordered list which is required to be searched frequently, and is also required to be updated frequently.
(a) True
(b) False
Answer: (a) True

Q56. AVL Tree invented by Adelson, Velskii and Landis.
(a) True
(b) False
Answer: (b) False

Q57. Implementations of AVL tree insertion rely on deleting an extra attribute – the balance factor – to each node.
(a) True
(b) False
Answer: (b) False

Q58. Identifi er of any node in the right sub-tree is greater than the identifi er of the root and the left sub-tree as well as right sub-tree both are binary search trees.
(a) True
(b) False
Answer: (a) True

Q59. A binary search tree is basically a binary tree, and therefore it can be traversed is inorder, preorder, and —-
Answer: postorder

Q60. To create a —- we use a procedure named insert which creates a new node with the data value supplied as a parameter to it, and inserts into an already existing tree whose root pointer is also passed as a parameter
Answer: binary search tree

Q61. To —- from a binary search tree the method to be used depends on whether a node to be deleted has one child, two children, or has no child.
Answer: delete a node

Q62. To search the binary tree for a particular node, we use procedures similar to those we used when —- to it.
Answer: adding

Q63. A more effi cient implementation of a dynamic dictionary involves considering a key to be a sequence of —-
Answer: characters

Q64. Splay Trees were invented by
(a) Sleator
(b) Tarjan
(c) Newton
(d) Both (a) and (b)
Answer: (d) Both (a) and (b)

Q65. The run time for each operation is essentially the same as for a —-
(a) Splay operation.
(b) Zero operation
(c) Play operation
(d) None of the above
Answer: (a) Splay operation.

Q66. The time complexity of maintaining a splay tree is analyzed using an Amortized Analysis.
(a) True
(b) False
Answer: (a) True

Q67. Each node does not contain a character.
(a) True
(b) False
Answer: (a) True

Q68. The —- of maintaining a splay tree is analyzed using an Amortized Analysis.
Answer: time complexity

Q69. The trick of the analysis is to defi ne a potential function and to show that each splay operation has —-
Answer: amortized costs O (ln (n))

Q70. The key to —- is to defi ne the right potential function.
Answer: amortized analysis

Q71. There are two kinds of —- rotations and one single rotation.
Answer: double

Q72. A b-tree has a minimum number of allowable children for each node known as the —-
(a) Minimization factor
(b) Maximization factor
(c) Operational factor
(d) Situational factor
Answer: (a) Minimization factor

Q73. Binary tree is a special type of tree having degree.
(a) 3
(b) 1
(c) 2
(d) 4
Answer: (c) 2

Q74. The search operation on a b-tree is —- to a search on a binary tree.
Answer: analogous

Q75. A —- is a collection of data organized in a fashion that facilitates updating, retrieving, and managing the data.
Answer: database

Q76. A B-tree is kept balanced by requiring that all leaf nodes are at the same —-
Answer: depth

Q77. The —- operation creates an empty b-tree by allocating a new root node that has no keys and is a leaf node.
Answer: B-Tree-Create

Q78. Deletion of a key from a b-tree is possible
(a) True
(b) False
Answer: (a) True

Q79. B-trees do not shrink when keys are deleted.
(a) True
(b) False
Answer: (b) False

Q80. The lower and upper bounds on the number of child nodes are typically fi xed for a particular implementation.
(a) True
(b) False
Answer: (a) True

Q81. To perform an insertion on a b-tree, the appropriate node for the key must be located using an algorithm similiar to B-Tree-Search.
(a) True
(b) False
Answer: (a) True

Q82. The simplest form of open hashing defi nes each slot in the hash table to be the head of a —-
Answer: linked list

Q83. —- is most appropriate when the hash table is kept in main memory, with the lists implemented by a standard in-memory linked list.
Answer: Open hashing

Q84. —- resolution is the most important issue in hash table implementations.
Answer: Collision

Q85. A Hash Function must be —- and stateless.
Answer: deterministic

Q86. A —- is referred to or accessed frequently either for adding the name, or for storing the attributes of the name, or for retrieving the attributes of the name.
Answer: symbol table

Q87. Hashing is a method of directly computing the index of the table by using some suitable mathematical function called —-
Answer: hash function

Q88. Collision handling involve fi nding out an alternative location for one of the two colliding —-
Answer: symbols

Q89. —- method ignores part of key, and use the remainder part directly as hash value.
Answer: Truncation

Q90. A heap is a partially sorted —-
Answer: binary tree

Q91. Complete trees and perfect trees are —-
Answer: closely related

Q92. In a heap the —- is found at the root.
Answer: smallest key

Q93. The —- method removes from a priority queue the item having the smallest key.
Answer: dequeueMin

Q94. The —- of an event depends on the type of that event.
Answer: simulation

Q95. The minimum priority item in a min-heap may always be found at —- of the array.
Answer: position 0

Q96. The heap is one maximally-effi cient implementation of an abstract data type called a —-
Answer: priority queue

Q97. —- calculations are used to fi nd the parent and the children of a given node in the tree.
Answer: Array subscript

Q98. A collection of trees is called a —-
Answer: fores

Q99. Every node in binary tree has associated with it a quantity called its —-
Answer: null path length

Q100. The null path length of an empty tree is —-
Answer: zero

Q101. A leftist tree is a tree in which the shortest path to an external node is always on the —-
Answer: right

Q102. The —- method of the LeftistHeap class is used to put items into the heap.
Answer: enqueue

Q103. The —- method locates the item with the smallest key in a given priority queue.
Answer: findMin

Q104. Skew heaps as proposed by —-
Answer: Sleator and Tarjan

Q105. Each of the trees in a binomial queue has a very special shape called a —-
Answer: binomial tree

Q106. Which one is not the method of internal sorting?
(a) Heap sort
(b) Merge sort
(c) Quick sort
(d) Bubble sort
Answer: (b) Merge sort

Q107. Polyphase sort is a
(a) Internal sort
(b) External sort
(c) Both of the above
(d) None
Answer: (b) External sort

Q108. —- is a sorting technique which sorts a contiguous list of length n with O(nlog2(n) comparisons and movement of entries, even in the worst case.
(a) Heap sort
(b) Merge sort
(c) Quick sort
(d) Bubble sort
Answer: (a) Heap sort

Q109. Heap sort proceeds in
(a) Five phase
(b) Three phases
(c) One phase
(d) Two phase
Answer: (d) Two phase

Q110. Arranging objects in a specifi ed order is called —-
Answer: sorting

Q111. The average time complexity of the quick sort algorithm is —-
Answer: O(nlog D)

Q112. The computing time of heapsort is —-
Answer: O(n log(n)) + O(n)

Q113. The time complexity of the algorithm is —- both average and worst case.
Answer: O(nlog2 (n))

Q114. The order of linear search in worst case is O(n/2).
(a) True
(b) False
Answer: (b) False

Q115. Linear search is more effi cient than Binary search.
(a) True
(b) False
Answer: (b) False

Q116. For Binary search, the array has to be sorted in ascending order only.
(a) True
(b) False
Answer: (b) False

Q117. A file is a collection of records and a record is in turn a collection of fi elds.
(a) True
(b) False
Answer: (a) True

Q118. A graph may have many —-
Answer: spanning trees

Q119. The weight of a tree is just the sum of weights of its —-
Answer: edges

Q120. The —- ends when no more paths are found.
Answer: algorithm

Q121. In an undirected graph, pair of vertices representing any edge is —-
Answer: unordered

Q122. In a Digraph the path is called a directed path and a cycle as —-
Answer: directed cycle

Q123. E.W. Dijkstra developed an algorithm to determine the shorted path between two nodes in a graph.
(a) True
(b) False
Answer: (a) True

Q124. The algorithm is not equally applicable to a graph, a digraph, or even to a mixed graph with only some of its sides directed.
(a) True
(b) False
Answer: (b) False

Q125. A cycle is not a path in which fi rst and last vertices are the same.
(a) True
(b) False
Answer: (b) False

Q126. A good deal of nomenclature is associated with graphs.
(a) True
(b) False
Answer: (a) True

Q127. In a Digraph the path is called a directed path and a cycle as directed cycle.
Answer: (a) True

Q128. Network fl ow is an advanced branch of graph theory
(a) True
(b) False
Answer: (a) True

Q129. Kruskal’s algorithm is an algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph.
(a) True
(b) False
Answer: (a) True

Q130. Kruskal’s algorithm is not an example of a greedy algorithm.
(a) True
(b) False
Answer: (b) False

Q131. Prim’s algorithm is an algorithm in graph theory that finds a minimum spanning tree for a connected weighted graph.
(a) True
(b) False
Answer: (a) True

Q132. A graph may not have many spanning trees.
(a) True
(b) False
Answer: (b) False

Q133. Prism algorithm was discovered in 1930 by mathematician —-
Answer: Vojtich Jarnik

Q134. —- developed some examples on which the running time is based.
Answer: Norman Zadeh

Q135. A —- can solve it in linear expected time.
Answer: randomized algorithm

Q136. Kruskal’s algorithm is an algorithm in graph theory that fi nds a minimum spanning tree for a connected —- graph.
Answer: weighted

Q137. Prism’s algorithms sometimes called the —-
Answer: DJP algorithm

Also study other MCQs

  1. Management Theory and Practice MCQ with Answer
  2. Organizational Behavior MCQ with Answers
  3. Marketing Management MCQ with Answer
  4. Business Economics MCQ with Answer
  5. Information Systems for Managers MCQ with Answer
  6. Financial Accounting and Analysis MCQ with Answers
  7. Advanced Auditing mcq with answer
  8. Advanced Communication Skills mcq with answer
  9. Advanced Data Structure and Algorithms objective mcq with answer
ed010d383e1f191bdb025d5985cc03fc?s=120&d=mm&r=g

DistPub Team

Distance Publisher (DistPub.com) provide project writing help from year 2007 and provide writing and editing help to hundreds student every year.