Pregunta de entrevista de Samsung Electronics

A search question which uses recursion