Problem 43975. Permute the unique values of a vector without sorting
Solution Stats
Problem Comments
-
3 Comments
The problem title and description have been improved.
What should the behavior be when a certain value occurs three times or more in vector A? For example, when A = [2 5 3 4 2 1 3 2] (which is the same as the A in the problem description, but with another '2' added to the end), should matrix B list [5 4 2 1 3] before [5 3 4 1 2], or after?
The problem would be more interesting with a test case having more than 2 repeating elements.
Solution Comments
Show commentsProblem Recent Solvers15
Suggested Problems
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1201 Solvers
-
Determine Whether an array is empty
785 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
836 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
636 Solvers
-
Back to basics - mean of corner elements of a matrix
433 Solvers
More from this Author3
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!