We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9cade7 commit d83c2cbCopy full SHA for d83c2cb
Reverse_Words_in_a_String.cc
@@ -1,4 +1,5 @@
1
//O(1) space solution
2
+// First, normalize the string, then reverse substring and at last reverse the whole string.
3
class Solution {
4
public:
5
void reverseWords(string &s) {
0 commit comments