if x=2;
y=[2 1;
1 1]
if x=4;
y=[4 3 2 1
3 3 2 1
0 2 2 1
0 0 1 1]
if x=5;
y=[5 4 3 2 1
4 4 3 2 1
0 3 3 2 1
0 0 2 2 1
0 0 0 1 1]
Goodluck and may the God be with you
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers29
Suggested Problems
-
28144 Solvers
-
6989 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
2058 Solvers
-
427 Solvers
-
4701 Solvers
More from this Author5
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
May God be with you.