Member-only story
#OneYearCodingPlan : Stacks & Queues
#OneYearCodingPlan : Month 3
In this article, we’ll discuss Stacks & Queues for coding interviews.
Timeline:
Format, syntax, and uses of stacks and queues —1 week
Doing the project stated below — 1 week
Easy + Medium questions — 1 week
Hard questions — 1 week
Feel free to skip the first 2 weeks if you aren’t an amateur.
Resources for learning:
Think of a stack as a literal stack of books, one on top of the other. The last book you put on the stack will be the first book you pick up. Think of a queue as a literal queue of students waiting for something. The first person who entered the queue will be the first person chosen.
Stack: LIFO — Last in, first out.
Queue: FIFO — First in, first out.
Understanding the difference and syntax: GeeksForGeeks
Array and LinkedList implementation of stacks and queues: Interview bit or GeeksForGeeks
Implementing them will give you a better idea of how the structures work. The project will further help solidify your understanding.