TL;DR
- Arrays are still the highest-frequency interview surface for frontend engineers.
- The useful patterns are indexing, prefix accumulation, interval thinking, in-place mutation, and state transformation.
- I practice these as data-shaping problems, not just whiteboard drills.
Context
In frontend systems, arrays show up everywhere: feed ordering, table transforms, pagination, diffing UI state, drag-and-drop reorder, timeline grouping, and analytics rollups.
The Approach
Practice these 10 medium-level questions:
- Product of Array Except Self — build left/right products without division.
- Rotate Array by K Steps — handle large
kand in-place mutation trade-offs. - Merge Overlapping Intervals — useful for timeline and booking-style UI ranges.
- Insert Interval into Sorted Ranges — merge one incoming range into an existing ordered list.
- Spiral Matrix Traversal — index-boundary practice with rectangular inputs.
- Minimum Size Subarray Sum — combine prefix intuition with shrinking windows.
- Move Zeroes Stably — preserve order while compacting meaningful values.
- Find First Missing Positive — strong in-place index mapping practice.
- Container With Most Water — pair arrays with pointer reasoning.
- Daily Temperatures — array output with deferred answers and monotonic thinking.
Try it in the browser
Browser Practice
Array practice: merge overlapping intervals
Implement solve(intervals) and return a merged list sorted by start time.
Sample Tests
3 checks
Function name:
solveBest for JavaScript / TypeScript / JSON practice snippets.Monospace editorRuns in browser sandbox
Trade-offs
- Array problems often have a brute-force answer fast, but the better interview signal is whether I can see the data movement pattern.
- In-place solutions save memory, but they can reduce readability if the mutation path gets tricky.