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) or First In Last Out (FILO).

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




Like the course? Get enrolled and start learning!