Stacks and queues
What's the difference between a stack and a queue?
What's the difference between a stack and a queue?
A stack is LIFO (the last thing in comes out first), a queue is FIFO (the first thing in comes out first). Both have fixed ends for adding and removing, so insertion and removal are O(1).
CS fundamentals and algorithmsShort answerBasics
You want a stack, like an editor's undo stack, that returns the "current maximum" of the…
#stack
CS fundamentals and algorithmsShort answerBasics
You're designing an LRU cache that keeps only recently used items. To make get and put…
#data-structure
CS fundamentals and algorithmsShort answerIntro
A Swift string mixes ()[]{} and you're checking with a stack whether they nest correctly…
#stack
ArchitectureShort answerAdvanced
What problem is the Coordinator in MVVM-C meant to solve?
#navigation