Pregunta de entrevista de Desquared

Write a small function that performs an asked operation Questions about algorithms complexity