Samsung Electronics Interview Question

A search question which uses recursion