+ 1
You are not increasing the index when str[i] is not a white space.
0
Manav Roy I think this is the you are expecting to happen....
https://code.sololearn.com/ctGb3hkqvrcT/?ref=app
If yes, please lemme know
0
Manav Roy yes, Also i mentioned the change in code by comment '//change'.