Remove duplicates from unsorted array
**Problem **
Remove duplicates from unsorted array
Example
a[1,5,2,6,8,9,1,1,10,3,2,4,1,3,11,3] ```so after that operation the array should look like a[1,5,2,6,8,9,10,3,4,11]
Solution **Method 1 - Brute Force - Check every element against every other element** The naive solution is to check every element against every other element. This is wasteful and yields an O(n2) solution, even if you only go "forward". **Method 2 - Sort then remove duplicates** A better solution is sort the array and then check each element to the one next to it to find duplicates.
[Read More]