Back to problems

Solve Two String Problems

Algorithm · Meta · Medium

Solve the following two string-processing tasks. Problem 1 Given strings s and t, decide whether exactly one edit operation changes one string into the other. An edit operation is exactly one of the following actions: inserting a character, deleting a character, replacing one character with another. Return true if such an operation exists, and false otherwise. Identical strings should return false because zero edits are required. Example 1: Explanation: Changing the first…

Checking your access…