Coursera Coding Interview Questions
25 Coursera coding interview problems with full optimal solutions — 15 easy, 7 medium, 3 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Coursera interviewer values, and a FAQ section.
Showing 1 problem of 25
- #15easysometimes
15. Pascal's Triangle
Pascal's Triangle asks you to materialize the first numRows rows of the triangle where every interior cell is the sum of the two cells directly above it. Coursera-reported phone screens use this easy LeetCode 118 warm-up to check three things fast: can you construct a 2-D array cleanly, can you state the row-build invariant out loud, and do you recognize that O(n^2) time is output-bound because the answer itself contains roughly n^2/2 numbers.