Microsoft | SDE1
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2022-07-17Added By Anonymous
Source: Link
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.)