Frage im Vorstellungsgespräch bei Amazon

leetcode two pointer question, dynamic programming question