So you have 4 strings that are all identical? Could you explain how the "redundancy" of that is "6,4,1,3,5"? I'm not sure what redundancy means in the context of strings.
I think one string is "6,4,1,3,5" and you want to eliminate other identical strings?
You can put them into a Set one at a time. The Set will ignore or discard duplicates. Then take them back out of the Set with toArray
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi