Use STL set instead of array to check for duplicates
Remove unnecessary loop
Fix syntax error
Uses probabilistic method to initialize clusters (k-means++)