whatthefuck.is
whatthefuck.is copied to clipboard
WTF is Dynamic Programming
I think people should also learn a lot with algorithms, especially this.
It's a way of finding a solution for a complex problem by dividing into sub-problems.it is a good approach while dealing with the time complexity problems because its(problem solved using dp) time complexity is less where as space complexity arise in the worst cases .the thing is we can do dynamic programming using a top-down approach or bottom-up approach . For example ,take an example of printing n fibanocci numbers where n =10^11 .time limit is 1 second .when you do this using recursion,it surely raises TIME COMPLEXITY ERROR .the best way is to use dp .I advise you to see dp problems on any study platform like udemy, youtube so that you can get a better idea of it .