Day 5- Dynamic Programming

  1. TRIE- Very useful for Bit operations
  2. Dynamic Programming
    1. Recursion= Unoptimized, eats all stack space, time complexity cen be O(N)[check!]
    2. Top Down Approach= Reverse engineer the solution from the top. Think from the top. Think about and from the final answer.
    3. Bottom Up Approach= Start from the base case. Build answer from bottom, n=1
    4. Iteration
    5. Memoization

Always first apply Greedy approach, then if not successful, try Dynamic Programming.