Frage im Vorstellungsgespräch bei Amazon

2 difficult recursive/dynamic programming type questions on hackerrank