Definition of DP According to LeetCode

Few days back, I started to solve DP problems on LeetCode and after solving few problems, I noticed one of the thing that I want to share.

Beginner coder or coders on different website : DP problems can be done in two ways top-down approach (recursion with memoization) and bottom-up approach (tabulation).

LeetCode : "DP means only tabulation, there is nothing called top-down or bottom-up approach", you can easily notice in their solutions where, they mention Approach 1 (recursion), Approach 2 ( recursion with memoization), Approach 3 (Dynammic Programming).

And in my opinion, it is right what LeetCode does, the hardest part of DP (also, which make it harder for others) is coming up with a tabultaion solution, rather than just using memoization on your backtracking or dfs solution and say, "I am pro in DP".

If someone who got hurt or not satisfied from my point of view, please don't consider this post seriously, it is just my view and you can consider this post as a trash or joke also.

Comments (0)