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
- #70easycommonly asked
70. Climbing Stairs
Count the number of distinct ways to climb n stairs taking 1 or 2 steps at a time. Linear asks this to see if you recognize it as Fibonacci DP and can articulate why memoization beats plain recursion — a proxy for how you think about repeated subproblems.
- #704easycommonly asked
704. Binary Search
Search a sorted array in O(log n). Linear asks this to verify you can write a correct binary search without off-by-one bugs — a small problem that reveals a lot about coding precision.