HacktoberFestContribute
HacktoberFestContribute copied to clipboard
Contributed kSimilarStrings program in java .. Addition to String folder
Description of kSimilarStrings:
Strings A and B are K-similar (for some non-negative integer K) if we can swap the positions of two letters in A exactly K times so that the resulting string equals B.
Given two anagrams A and B, return the smallest K for which A and B are K-similar.
eg. Input: A = "ab", B = "ba" Output: 1