DSA Factory
Curriculum
Level 2 · Core

Stacks and queues

About 25 steps, from the first idea to a mastery test.

  1. Stage 0Last in, first outFree
    1. 1An undo button8 min
    2. 2Typing with backspace8 min
    3. 3Brackets that match10 min
    4. 4A queue: first in, first out10 min
  2. Stage 1Matching bracketsFree
    1. 1How many brackets are missing12 min
    2. 2The longest run that matches16 min
    3. 3Score the brackets16 min
    4. 4Reverse inside the brackets16 min
  3. Stage 2Monotonic stackFree
    1. 1The next bigger value on the right14 min
    2. 2Days until a warmer one14 min
    3. 3The biggest rectangle in a bar chart20 min
    4. 4The smallest number after removing digits18 min
  4. Stage 3Queues and dequesFree
    1. 1The biggest in every window18 min
    2. 2The first one that has not repeated14 min
    3. 3Order the deck16 min
    4. 4The longest steady stretch20 min
  5. Stage 4Expression evaluationFree
    1. 1Calculate in postfix order14 min
    2. 2Plus, minus and brackets18 min
    3. 3Multiply before you add18 min
    4. 4Tidy up a file path12 min
  6. Stage 5MasteryFree
    1. 1Asteroid field18 min
    2. 2Can this order happen14 min
    3. 3Smallest word of distinct letters20 min
    4. 4Add up every subarray's lowest value22 min
    5. 5Rain between the walls20 min
Start freeTry a step first