Data Structure Design
Everything on SkillVeris tagged Data Structure Design — collected across the glossary, study notes, blog, and cheat sheets.
3 resources across 1 library
Interview Questions(3)
How Would You Implement a Stack Using Queues?
A stack (LIFO) can be built from one or two FIFO queues by rotating the queue after every push so the newest element sits at the front, which makes push O(n) a…
How Would You Implement a Queue Using Stacks?
A queue (FIFO) can be built from two stacks: an 'in' stack absorbs every enqueue in O(1), and an 'out' stack is refilled by popping everything off 'in' and pus…
How Would You Design a Min Stack?
A min stack supports push, pop, top, and getMin all in O(1) by maintaining a second, auxiliary stack that tracks the minimum value at each point in the main st…