Dynamic programming: never solve the same thing twiceLesson 6 of 6

Greedy or DP: paying riders exact change

Biggest note first pays ৳88 in 6 pieces, as the table does. With coins 1, 5 and 7, greedy pays ৳10 with 4 coins; the table needs 2.

Locked

Unlock the rest of Algorithms and Data Structures: what everything costs.

  • Every lesson, every resource, unlocked instantly.
  • Track progress and pick up where you left off.
  • Free preview lessons stay readable from the outline.

From

BDT 0

Enrol now