Buddy Strings at DoorDash

Easy33.9% acceptance

This problem has 62.5% frequency at DoorDash.

Problem Description

Given two strings `s` and `goal`, return `true` _if you can swap two letters in_`s` _so the result is equal to_`goal` _, otherwise, return_`false` _._ Swapping letters is defined as taking two indices `i` and `j` (0-indexed) such that `i != j` and swapping the characters at `s[i]` and `s[j]`. *...

Read full problem and hints

Topics

Also asked at 2 companies


More DoorDash Questions

View all DoorDash questions