Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 118. Pascal's Triangle
Generate the first numRows of Pascal's Triangle as a list of lists, where each row starts and ends with 1 and every interior element equals the sum of the two elements above it. The task is to construct these rows iteratively (or via binomial coefficients) for 1 <= numRows <= 30.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.