Pregunta de entrevista de Ericsson

Array problem solving question in python