Neural Ninjas Β· DSA Simulation Labs Β· Lab 18

πŸš‡ The Double-Ended Tube

Bigger numbers eject every smaller one from the back before entering β€” they're useless now. Old numbers get ejected from the front the moment the window outgrows them. The front always holds the window's max.

Deque Log

Controls

πŸš‡ DequeFront to back, I only ever hold decreasing values. Whoever's at my front right now is the biggest number still in play.
πŸͺŸ WindowI slide forward one step at a time. Anything I've left behind gets kicked out the front β€” it's not my problem anymore.
Pick a level above to begin.