Surya Software interview question

Random Puzzles and Coding Questions from GFG