Domanda di colloquio di JPMorganChase

First question was relatively easy, second question was pretty difficult string question