Set 15 - 1D Dynamic Programming

Use Practice Loop if you need a reset.

Problems

ProblemDifficultyPatternVideo
LC 70. Climbing StairsEasyFibonacci-styleVideo
LC 746. Min Cost Climbing StairsEasyMin pathVideo
LC 198. House RobberMediumSkip patternVideo
LC 213. House Robber IIMediumCircular arrayVideo

Deliverables

  • Write a 1-line invariant for each problem.
  • Note 1 edge case or pitfall per problem.
  • Record time-to-first-correct solution.

Notes

  • LC 70: Fibonacci DP; ways[i]=ways[i-1]+ways[i-2].
  • LC 746: dp cost; min of previous two; start at 0/1.
  • LC 198: dp[i]=max(dp[i-1], dp[i-2]+num).
  • LC 213: run House Robber twice (exclude first/last).

Review

  • Time spent + where you got stuck?
  • Biggest mistake or missed edge case?
  • One concrete improvement for next time.

Comments

Share your approach or ask questions

0 comments
?
|
Markdown supported
Sign in to post

Loading comments...