Loading...
The Lab: Solve & Master
Section 1 of 8
Put your LIFO and FIFO knowledge to the test. Theory is fine, but code is where mastery lives.
Always try to trace the stack/queue on paper before writing the code. Most logic errors happen at the "boundaries" (empty stack, single item).
Given a string containing just the characters `(`, `)`, `{`, `}`, `[` and `]`, determine if the input string is valid.
Click to brainstorm and reveal the code
Mental exercise recommended
You've mastered the building blocks of LIFO and FIFO behavior. You're now ready to tackle linear and non-linear data structures with confidence.