Check my code is it correct?
Yes it is fine, if you are facing any particular issue with it then tell.
As You have covered all the possible edges so it is correct.
Yes it is fine, if you are facing any particular issue with it then tell.
As You have covered all the possible edges so it is correct.