What is wrong in this?

https://ide.codingblocks.com/s/589803 just go through this once… i hope all ur doubts would be cleared

https://ide.codingblocks.com/s/589655 please can you check once I guess the only diff is hpw we are handling -1 case earlier also

shit man i messed with input was looping till n instead of w

justcheck once I guess minor error is there

oh man this n is of no use

: ( … done thanks

sry for the delay… actually was a bit busy… ok cool its great if u found the error urself

is ur doubt cleared… shall i mark it as resolved??

yes i marked it … thanks … np anyhow you have always helped me :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.