The coding interview question and solutions from our community.
“Given an input string s, reverse words in a string.” Do this in-place without allocating an extra space. The input string doesn’t contain any leading or trailing spaces and all words are separated by a single space.
For example, given string “the weather is cold today”, return “today cold is weather the”.
Rob McCartney (Software Engineer at Google)
If you want to become a part of our community, ping me here.