Question

What is the time complexity for performing `push` and `pop` operations on a stack implemented using a linked list?

A O(n) for both
B O(log n) for both
C O(1) for both
D O(1) for push, O(n) for pop
E O(n) for push, O(1) for pop
Practice Next

Hey! Ask a query