Global Shiksha interview question

Test cases