Notes
This function is in beta test. Please help improve it in the issues
here.
AddressSanitizer:DEADLYSIGNAL ================================================================= ==63658==ERROR: AddressSanitizer: stack-overflow on address 0x7ffee46aa000 (pc 0x7f4bea7fc90d bp 0x7ffee469bb70 sp 0x7ffee469b490 T0) AddressSanitizer:DEADLYSIGNAL AddressSanitizer: nested bug in the same thread, aborting.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
JOJ Answer
Input a string: * Choose 1 to replace a character or 2 to delete a character: Delete character: New string: b b b bb b b bbb b bbbb b b bbb b b bbb b bbb bb b bbbbbbbbb bb b bb b bb b bbb b b bb bb bbbb b b bb bbb bbb b bbb b bb b b bbbbbb bbb b bbbbbb b b b b bbbb b bbbbb bbbbbb bbb bb bbb bbbbbbb b bbb bb bbbb bbbbb bb bbb bbbb bb bb bb bbb b b bbbbb b b bb b bb b bb bbbbbb bbbb b b bbbbbb bb bb b b b bb bb bbb bb b bb b b b bb bb b b b b bb bb b b bbb b bb b b bb bb b bb b bbb b b b bbb b b bbb bb b b b b bb b bbb b bb b b b b bbb b b bb bb bbbbb bbbb b b b bbb bb bbbbbb bbbb b b bb bb b bb bb b b b bbbb bb b bbbbbbb bbbbb bb bb bbbb b b bbb b bb b b bb b b b b b bb b b b bb bbb b b b b bb bb bbb bbbbbbb b bbb bb b b bb b bb b b b b b b b bbbbbb bbb bbbb b b bb bb b b bb b bbbbbb b bbb b