Pregunta de entrevista de Amazon

Don't remember, two algorithms problems leetcode style