Time Complexity
- Push(): O(1) - Adding to the top involves a single index update or pointer change.
- Pop(): O(1) - Removing from the top is instantaneous.
- Peek()/Top(): O(1) - Accessing the top element doesn't require traversal.
- Search/Access(i): O(N) - Getting a random element requires popping N elements to reach it.