+ 3
Nice code Arpit Jain đ
But if you're really into helping the learner, then you could add some comments in your code to explain how it works. That way the learner and anyone who view the code can understand the code, go beyond copy/pasting the code with nothing new learned after.
+ 2
This is the code you want...hope it helps you.
https://code.sololearn.com/cKjhSWzWmzMK/?ref=app
+ 2
Thanks Ipang for this suggestion.....next time i will keep this in mind.