There were 5 questions in total and they were of medium-hard difficulty, except Q.2, which was easy.





Solutions:
I could solve only question 2, which was of easy difficulty IMO.

I tried for almost 2 hours to solve question 3 and question 5, but some test cases failed invariably on both of these questions.



Any help on these questions will be greatly appreciated.