Pregunta de entrevista de Amazon

2 Leetcode difficult level Questions on Hacker Rank