Check if two given strings are one edit different

O(N) solution, where N is the length of larger string.