Question: a ) One can implement a stack based on a linked list so that all relevant push / pop operation is time O ( 1
a One can implement a stack based on a linked list so that all relevant pushpop operation is time O
b One can not implement a stack of unbounded size based on an array so that each individual pushpop operation is time O
c The core data structure of DepthFirst Search is a stack.
d One can reverse the order of the elements in a singly linked list in time ON
e It is possible to append two priority queues in time O
f Adding an element to a Stack has worstcase time complexity OlogN
g Returning the maximum element in a PriorityQueue larger the element, higher the priority can be done in time O
g Returning the minimum element in a PriorityQueue larger the element, higher the priority can be done in time O
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
