Set 20 - Classic DP Problems

Use Practice Loop if you need a reset.

Problems

ProblemDifficultyPatternVideo
LC 139. Word BreakMediumString DPVideo
LC 416. Partition Equal Subset SumMedium0/1 KnapsackVideo
LC 494. Target SumMedium0/1 KnapsackVideo

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 139: dp[i] true if any word ends at i.
  • LC 416: subset sum to half; dp boolean; reverse loop.
  • LC 494: transform to subset sum or dp offset.

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...