Pregunta de entrevista de JPMorganChase

Both were array questions in python,