https://www.geeksforgeeks.org/radix-sort/
Dynamic Programming - Optimization of the solution.
1. Greedy Algorithm - In a greedy algorithm the decision is taken once and the result is calculated based on the same decision. Like Dijastra's Algorithm where we always take the shortest vertex to find the shortest path. Other example Minimum cost spanning tree - Always select the minimum cost edge.
2. Dynamic Programming - The decision is taken at every step to get to an optimal solution.
Memoization is a technique used to optimize the time complexity. In the technique we store the result of the calculation so that we can use them again. It is a top down approach. This is used in Recursion.
Tabulation is a technique which is a bottom up approach. We start with the smallest value and calculate the bigger problems. It is used as part of the iterative method
No comments:
Post a Comment