+ 1
How are duplicates removed from a given array in Java?
1 Answer
+ 9
you can use a set https://docs.oracle.com/javase/7/docs/api/java/util/Set.html which does not allow for duplicates.
or https://stackoverflow.com/questions/17967114/how-to-efficiently-remove-duplicates-from-an-array-without-using-set
Second answer. Instead of printing, add "current" to a new array
Hot today
sizeof funtion with a loop in c!
1 Votes