Pregunta de entrevista de Headout

DSA Question of easy-mid difficulty