Field note / fundamentals

publishedupdated 2026-05-04#algorithms#arrays#interview#practice#frontend

Coding Practice: Arrays

Ten medium-level array questions that sharpen indexing, range handling, transformation, and mutation patterns for senior frontend engineers.

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:

  1. Product of Array Except Self — build left/right products without division.
  2. Rotate Array by K Steps — handle large k and in-place mutation trade-offs.
  3. Merge Overlapping Intervals — useful for timeline and booking-style UI ranges.
  4. Insert Interval into Sorted Ranges — merge one incoming range into an existing ordered list.
  5. Spiral Matrix Traversal — index-boundary practice with rectangular inputs.
  6. Minimum Size Subarray Sum — combine prefix intuition with shrinking windows.
  7. Move Zeroes Stably — preserve order while compacting meaningful values.
  8. Find First Missing Positive — strong in-place index mapping practice.
  9. Container With Most Water — pair arrays with pointer reasoning.
  10. 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: solve
Best 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.

References