return to all data-structures

return to concepts

The Stack Data Structure

Overview

Stack Operations

There are four basic operations1 that can be done on a stack:

When to Use Stacks

Time Complexity

Operation Time Complexity
Push O(1)
Pop O(1)

Practice Problems

Check out HackerEarth’s Basics of Stacks page for more practice problems.

References

  1. GeeksforGeeks: Stack Data Structure (Introduction and Program)

return to all data-structures

return to concepts