Tally Solutions Interview Question

Dsa based with some puzzles