Pregunta de entrevista de Amazon

One DP question and basic ML questions.