I was asked to write my own implementation to remove duplicated values in an array. Here is what I have created. But after tests with 1,000,000 elements it took very long ti
class Demo { public static void main(String[] args) { int a[]={3,2,1,4,2,1}; System.out.print("Before Sorting:"); for (int i=0;ia[j]) { int temp=a[i]; a[i]=a[j]; a[j]=temp; } } } //After sorting for(int i=0;i