This article explains the correct dynamic programming solution for LeetCode 96: Unique Binary Search Trees.I also document a common mistake that many learners make, including myself: trying to derive dp[n] by inserting a new node into all BSTs of siz...
Markdown supported · ⌘↵ to post
No responses yet.