Given this input
x = 2, 5, 1, 2, 4, 1, 1, 3
output should be (Five 2's, Two 1's, One 4, Three 1's)
[2 2 2 2 2 1 1 4 1 1 1]
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers63
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
2050 Solvers
-
16781 Solvers
-
Sum of diagonal of a square matrix
1640 Solvers
-
Generate N equally spaced intervals between -L and L
952 Solvers
-
Who is the smartest MATLAB programmer?
792 Solvers
More from this Author43
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!