Skip to content

Conversation

@greencarlos
Copy link
Contributor

@greencarlos greencarlos commented Oct 22, 2020

What this PR does:

Triple Step Backtracking, Top-Down memo, Bottom-Up memo, and constant space solutions

Triple Step:

A child is running up a staircase with n steps and
can hop either 1 step, 2 steps, or 3 steps at a time.
Implement a method to count how many possible ways
the child can run up the stairs.

Recursion and Dynamic Programming (4 steps)

  1. Start with the recursive backtracking solution
  2. Optimize by using a memoization table (top-down dynamic programming)
  3. Remove the need for recursion (bottom-up dynamic programming)
  4. Apply final tricks to reduce the time/memory complexity

@greencarlos greencarlos mentioned this pull request Oct 22, 2020
@greencarlos greencarlos changed the title Triple step 8.01 Triple step Nov 7, 2020
Copy link
Collaborator

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than deleting the previous soln, could you please add yours as a new alternative in a different file (*-v2)?

@greencarlos
Copy link
Contributor Author

@profnandaa updated

@greencarlos greencarlos requested a review from profnandaa May 8, 2021 20:58
@profnandaa
Copy link
Collaborator

Thanks!

@profnandaa profnandaa merged commit bea811c into careercup:master May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants