Pity that eval is forbidden - I had quite an elegant solution using it.
Given an unsigned integer x, find the largest y by rearranging the bits in x
780 Solvers
Sort numbers by outside digits
127 Solvers
91 Solvers
208 Solvers
78 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!