Compare letters and countsMedium
Determine if Two Strings Are Close
You may swap any two letters of a word, or turn every one of a letter into another letter that is in it and every one of that into the first. Say whether word1 can become word2 this way.