This problem was asked by Facebook.
Given a string and a set of delimiters, reverse the words in the string while maintaining the relative order of the delimiters. For example, given "hello/world:here", return "here/world:hello"
Follow-up: Does your solution work for the following cases: "hello/world:here/", "hello//world:here"