I’m trying to take an array, check if there are any dupes, and remove the all instances of that letter, The method I’m currently trying to use is very ugly
Example;
In: ABBCCDE
Out: ADE
Or
In: BCACDF
Out: BADF
I’m currently using two for loops to find the dupes, adding the Char[] for that dupe to a OTHER array, then looping around with 2 more for loops deleting the chars from my ErrorArray.
Using
SETallows you to remove any duplicates value automatically. Since you are using array, you will need to convert it usingArrays.asList(T.. a)