— And as a funny fact, such an error even was found in a Stroustrup's book, but in his case, as the strings have the same length, the result is the same, but if you change it... https://stackoverflow.com/questions/27158812/does-this-code-from-the-c-programming-language-4th-edition-section-36-3-6-ha
— How much time will it take to jump from c++98 to c++17?
— What is the meaning of linear time and constant additional space?
— O(n) and O(1) resp
— Linear time means O(n), means if you have 100000 elements versus 10000 elements, it can be 10 times slower, but no more than that constant space means O(1), means the space should be the same for 1, 10 or 100000 elements