Pregunta de entrevista de Amazon

leetcode hard and leetcode easy, doable in time allowed.