Samsung Electronics interview question

A search question which uses recursion