You want to write a revolutionary string comparator that will check whether two strings are equal. You don't want to use the usual comparator because even the best coders make mistakes from time to time. Your new comparator will consider strings s1 and s2 equivalent if they are of equal length, and they differ in at most one position.
Given two String[]s a and b, return a String[] where the i-th element is equal to "Yes" if a[i] and b[i] are considered equivalent with your new comparator, or "No" otherwise (all quotes for clarity).
|