1 comment

[ 2.3 ms ] story [ 15.7 ms ] thread
It's also possible to use dynamic-programming to elegantly solve the mentioned problem.