Chegg Interview Question

At onsite interview about puzzle.