Introduction To Data Structures - Study Mode
[#16] What kind of linked list is best to answer questions like "What is the item at position n?"
Correct Answer
(D) Array implementation of linked list
[#17] What is the time complexity of inserting at the end in dynamic arrays?
Correct Answer
(D) Either O(1) or O(n)
[#18] Consider the usual algorithm for determining whether a sequence of parentheses is balanced. The maximum number of parentheses that appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(()))?
Correct Answer
(C) 3
[#19] A queue follows . . . . . . . .
Correct Answer
(A) FIFO (First In First Out) principle
[#20] Consider you have an array of some random size. You need to perform dequeue operation. You can perform it using stack operation (push and pop) or using queue operations itself (enQueue and Dequeue). The output is guaranteed to be same. Find some differences?
Correct Answer
(A) They will have different time complexities