Problem 952. Unique: Enhanced Performance - Avoiding Memory Crash
The Challenge is to create the unique array for a long and wide array.
Difficulties are that the normal unique(a,'rows') function call will suffer a Memory crash on Cody. c=randi(4,9000000,48,'uint8')-1;
The second part of the challenge is Execution Speed.
The data is small integer representing data permutations of items like DNA and Rubik's cube faces.
Input: Array of uint8 of dimensions (m, 48) with values 0:3
Output: Array Equivalent to unique(A,'rows')
Hints:
1) Columns can be merged to form a reduced number of columns 2) Unique has the option to provide an Array and a sorting Index
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers15
Suggested Problems
-
Determine Whether an array is empty
775 Solvers
-
Find out missing number from a vector of 9 elements
299 Solvers
-
Replace multiples of 5 with NaN
440 Solvers
-
Sum of first n positive integers
581 Solvers
-
Let's get back to school, and create multiplication tables
213 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!