結果 : string reverse function in c++ time complexity