Logo
Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Introduction to Stack

Stack is a linear data structure that follows a particular order of operation. This order can either be Last In First Out (LIFO).

Imagine you have a pile of books that you plan to read. You keep adding books to the top of the pile. When you're ready to start reading, you take a book from the top of the pile. The last book you added to the pile is the first one you read. That's LIFO - the principle that stack data structures operate on.

What makes stacks so unique is their simplicity and elegance. Despite being straightforward, they can be incredibly powerful when used in the right way

.....

.....

.....

Like the course? Get enrolled and start learning!