← Back to TypeScript
Advanced Dynamic Programming
The recurrence is no longer a fibonacci in disguise — rob houses without neighbours, edit one word into another, and find the longest rising thread that was never contiguous.
Rob the street without touching neighbours
advancedblankComplete the two-number recurrence behind house robber — the best through the previous house and the best through the one before it.
Challenge: edit distance
expertchallengeCompute the minimum number of single-character edits — insert, delete, replace — that turn one word into another.
Challenge: the longest rising thread
advancedchallengeFind the length of the longest strictly increasing subsequence — the DP that indexes by where a run can end, not where it started.
Review: a streak is not a subsequence
advancedreviewThe analytics helper reports the longest run of consecutive rising days as if it were the longest rising subsequence. One word of spec, a different algorithm.