Which of the following uses only increment operations for adding and removing elements at either end?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: D. Deques
Explanation
A deque supports insertion and deletion at both ends. In its circular-array implementation the end pointers are moved by modular increments only, which is the intended answer.More Data Structures and Algorithms questions
- Match List I with List IIList I List II A. Breadth First Search I. LISP B. Depth First Search II. Syntax tree C. Prefix III. Stack D. Infix…
- Which of the following is NOT a divide and conquer method?
- Arrange the following steps of the inorder traversal of a binary tree in the correct order. A. Visit the left subtree B. Visit the root nod…
- Which of the following algorithms are based on Breadth First Search (BFS)? A. Prim's algorithm B. Kruskal's algorithm C. Dijkstra's algorit…
- Which of the following is the solution of the recurrence relation T(n) = T(2n/3) + 1?
- Which of the following description(s) is/are true? A. Red-Black Tree – guarantees worst case O(log n) time for search, insert & delete. B.…