Pregunta de entrevista de Yugabyte

to Solve the coding question they gave