• + 0 comments

    I did something similar.Converted String to StringBuffers sb1 and sb2. Upon iterating characters through sb1: if the character is found in sb2,then change that character value in sb2 to some other value(say '/') so that it couldn't be found in further iterations. This is essential as sb1 may have repeating characters.