0
What is the error?
Test solving extra terrestrial https://code.sololearn.com/c4h0qOepLNhj/?ref=app
2 Antworten
+ 2
Check where you are starting to access the characters. The string range is [0, length - 1], not [0, length].
0
With
y = x.length() -1;
It work!
Thanks