Given two string arrays of cities and states in a country, and given a target string, find if it is of the form of “valid city–valid state”.
(catch: if a city or state consists of two words (space separated), then in the target string that space can be replaced with a hyphen or can be space also. Both are valid configurations.)
Comments (2)


