Courses / DSA Patterns for Working Engineers / Chapter 30
Module 9 · Bits, maths and mixed practice · Chapter 30 of 39
Mixed Practice: Pick the Pattern Under Time
Builds on Sliding Windows: Fixed and Variable Ranges Over Sequences, Intervals: Merging, Inserting and Counting Overlaps, Heaps and Two Heaps: Running Medians and Priority Scheduling, Stacks: Matching, Parsing and Nested Structure, Graphs: Modelling, Breadth-First and Depth-First Search, Tree Depth-First Search: Recursion That Returns Answers Upward and Math and Geometry: Precision, Primes, Powers and Points. Next up: Monotonic Stacks and Deques: Next Greater, Spans and Window Maximums.
Part 1 · Running a timed set
The clock and the method
Every earlier chapter told you the pattern before you started. A real problem does not, and the skill that decides the outcome is reading a problem and choosing the tool. This chapter gives you three sets of two original problems with no pattern named in the statement, a clock to run them against, and hints that you open one at a time.
Give each problem 45 minutes, so a set of two takes a session of an hour and a half. Use the same phases as the budget in the interview chapter, and stop when the minutes run out even if the code is unfinished, because a half-finished attempt is the information you need for the review. Read only the statement and its examples, then start the clock and leave the hints unread until you choose to open them.