Algorithm · JPMorgan · Hard
Requirements In the primary version, receive two strings, s1 and s2, and determine the fewest edits required to make one an anagram of the other. Also consider a numeric-string version: divide one string of digits into two equal-length parts and find the minimum number of changes needed to make those parts anagrams. For the usual HackerRank-style operation, one replacement corrects one unmatched character in one half. When the two strings have equal length, the result is…
Checking your access…