Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 332 Bytes

README.md

File metadata and controls

5 lines (3 loc) · 332 Bytes

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"