https://videosashka.com/watch/sn_ZXe5wPDk/dynamic-programming-vs-greedy-method