Waymo Interview Question

Parse a string in a specific way