DoorDash | Staff | Phone
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2022-05-04Added By Anonymous
Source: Link
Company: DoorDash
Role: unknown
Stage: Phone Screen
Location: unknown
Year: unknown
Original Content:
Two restaurants R1 and R2 are similar if we can swap a maximum of two letters (in different positions) of R1, so that it equals R2. 1 Input: "hotpot", ["hottop", "hotopt", "hotpit", "httoop", "hptoot", "hotozt"] Output: ["hottop", "hotopt", "hptoot"] 2 Input: "biryani", ["biryani", "biryeni", "biriyani", "biriany", "briynai"] Output: ["biryani", "biriany"]
Role: unknown
Stage: Phone Screen
Location: unknown
Year: unknown
Original Content:
Two restaurants R1 and R2 are similar if we can swap a maximum of two letters (in different positions) of R1, so that it equals R2. 1 Input: "hotpot", ["hottop", "hotopt", "hotpit", "httoop", "hptoot", "hotozt"] Output: ["hottop", "hotopt", "hptoot"] 2 Input: "biryani", ["biryani", "biryeni", "biriyani", "biriany", "briynai"] Output: ["biryani", "biriany"]