Tredence interview question

Puzzles