LeetCode Edit Distance: 2D DP Step by Step
LeetCode 72 fully unpacked — the three-operation recurrence, the 2D table, and the rolling-array space optimization that makes interviewers nod.
·5 min read · #dsa#leetcode#dp
3 posts.
LeetCode 72 fully unpacked — the three-operation recurrence, the 2D table, and the rolling-array space optimization that makes interviewers nod.
LeetCode 300 in detail — the O(n^2) DP, the O(n log n) patience-sorting trick with binary search, and when each one matters.
LeetCode 62 in two ways — the O(m * n) grid DP that interviewers expect and the binomial-coefficient closed form that surprises them.