Problem 532. Return unique values without sorting
Solution Stats
Problem Comments
-
3 Comments
perhaps you should specify that y is in the order of the first occurence of each unique element of x
This would be a better problem if unique and sort functions were not allowed
Nice problem!
Solution Comments
-
1 Comment
Solution without using sort(.) or unique(.) .
-
1 Comment
Solution without using sort(_) or unique(_) .
-
1 Comment
Note 1) this solution does not use sort() anywhere :) 2) the more elegant "stable" is not available for unique in pre-2012 MATLAB.
Problem Recent Solvers713
Suggested Problems
-
Find the sum of all the numbers of the input vector
38215 Solvers
-
3018 Solvers
-
Vectorize the digits of an Integer
285 Solvers
-
Multiples of a Number in a Given Range
475 Solvers
-
288 Solvers
More from this Author30
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!