Nov 7, 2020
Why do you think that it returns "bb"?
Check it again. It returns "ba".
It compares (s[1] > s[1 + 1]) that is 'b' > 'a'
and then erase s[1] that is 'b'. Therefure we get "ba" as result.
Why do you think that it returns "bb"?
Check it again. It returns "ba".
It compares (s[1] > s[1 + 1]) that is 'b' > 'a'
and then erase s[1] that is 'b'. Therefure we get "ba" as result.
Looking for an interesting project to join. https://www.linkedin.com/in/molchevsky/