Question: Answer the following questions with either true or false. 1. One can implement a stack based on a linked list so that EACH INDIVIDUAL push/pop

Answer the following questions with either true or false.

1. One can implement a stack based on a linked list so that EACH INDIVIDUAL push/pop operation is time O(1)

2. One can implement a stack (of unbounded size) based on an array so that each idividual push/pop operation is time O(1)

3. One can reverse the order of the elements in a linked list in time O(n)

4. It is possible to append two linked lists in time O(1)

5. Adding an element to a heap has wort-case time complexity O(lon(n))

6. Returning the maximum element in a max-heap (but not deleting it from the heap) can be done in time O(1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!