Coviam Interview Question

Puzzles and logical questions to code.