- 1

Implementation of the Stack ADT using Singly Linked List and the Time Complexity Analysis of the Push and Pop Operations In thi

14th Jun 2020, 9:48 PM
Senanu Sogbaka
Senanu Sogbaka - avatar
3 Respostas
+ 2
The time complexity for push and pop is constant time O(1) for a list-based stack. If you implement one you'll find out why. A list-based stack should be easier to create than a linked list as you don't have to do any lookups or insertions/removals from the middle. Start with a singly linked list as the base and see if you can figure it out.
14th Jun 2020, 10:53 PM
Gen2oo
Gen2oo - avatar
0
can't solve it need help
14th Jun 2020, 10:07 PM
Senanu Sogbaka
Senanu Sogbaka - avatar
0
ooh okay thanks
14th Jun 2020, 11:00 PM
Senanu Sogbaka
Senanu Sogbaka - avatar