Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day 295 #601

Closed
vaskoz opened this issue Jun 13, 2019 · 1 comment · Fixed by #602
Closed

Day 295 #601

vaskoz opened this issue Jun 13, 2019 · 1 comment · Fixed by #602
Assignees

Comments

@vaskoz
Copy link
Owner

vaskoz commented Jun 13, 2019

Good morning! Here's your coding interview problem for today.

This problem was asked by Stitch Fix.

Pascal's triangle is a triangular array of integers constructed with the following formula:

The first row consists of the number 1.
For each subsequent row, each element is the sum of the numbers directly above it, on either side.
For example, here are the first few rows:

    1
   1 1
  1 2 1
 1 3 3 1
1 4 6 4 1

Given an input k, return the kth row of Pascal's triangle.

Bonus: Can you do this using only O(k) space?

@vaskoz vaskoz self-assigned this Jun 13, 2019
@vaskoz
Copy link
Owner Author

vaskoz commented Jun 13, 2019

@vaskoz vaskoz mentioned this issue Jun 13, 2019
@vaskoz vaskoz mentioned this issue Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant