title: Divide and conquer, dynamic programming and greedy algorithms!
body: <p>When I have a problem with optimal substructur and no subproblem shares subsubproblems then I can use a divide and conquer algorithm to solve it?</p>
  
  <p>But when the subproblem shares subsubproblems (overlapping subproblems) then I can use dynamic programming to solve the problem?</p>
  
  <p>Is this correct? </p>
  
  <p>And how is greedy algorithms similar to dynamic programming? </p>