Skip to main content

Linear Coding Interview Questions

25 Linear coding interview problems with full optimal solutions — 8 easy, 12 medium, 5 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Linear interviewer values, and a FAQ section.

Showing 2 problems of 25

  • #23hardfrequently asked

    23. Merge K Sorted Lists

    Merge k sorted linked lists into one. Linear uses this to see if you know the min-heap approach and can articulate why it's O(n log k) — a natural step up from the easy 'Merge Two Sorted Lists' problem.

  • #42hardfrequently asked

    42. Trapping Rain Water

    Calculate the total water trapped between elevation bars. Linear asks this to see whether you progress through the intuitions — brute force → precomputed max arrays → two pointers — and can articulate why the two-pointer approach is O(1) space.

Linear Coding Interview Questions — Full Solutions — InterviewChamp.AI