Searce interview question

Puzzle solving