I have tested my code orally acc. to me It should work fine but it is only working for second part not for first part
Can anyone explain why my code is not working for the first part?
Hi @Deepanshu_garg, your algo is correct except for 2 things:
- Check the conditions in line no. 18. It’s partially incorrect.
- Check for boundary conditions. That where should you put an = to sign and where not in the if conditions.
Hope this helps 
I have made some changes in
Can you check whether ithey are right??