+ 1
In spy life challange i have solved all test cases but test case 4 is not correct can someone help me debug my code ??
3 Answers
+ 1
The lines 25, 31, 39, and 52 are all undefined behaviour as you access non-existing memory. Either construct the strings with a sufficient initial size, or use member functions like push_back() or operator+=() to add characters to the end of the string.
Possible fix:
https://code.sololearn.com/cTQ3fAqZRbde/?ref=app
0
Thank you
0
I have understand you