Skip to content

Latest commit

 

History

History
51 lines (47 loc) · 5.51 KB

File metadata and controls

51 lines (47 loc) · 5.51 KB

Competitive programming

Notes

  • DP’s secret: think globally optimal, not just locally.
    • You have to break the problem into simpler subproblems, solving each of them just once, and building the solution combining these solved subproblems
  • The opposite of DP is a greedy algorithm because the latter picks the locally optimal choice at each step. And locally optimal choices may result in a bad global solution.

Links