Nice one :)
Very well thought problem. Took me a few minutes to see why the "simplest" solution was incorrect. Well posed problem.
this is cheating, this is just calling the assert program, not solving the problem. Moderators should delete such solutions.
why is this wrong???
It works in matlab installed in my pc,I dont konw the exact reason why the script encounters a long run time error while compiling here
Well thought!!
Make the vector [1 2 3 4 5 6 7 8 9 10]
36265 Solvers
Given an unsigned integer x, find the largest y by rearranging the bits in x
799 Solvers
353 Solvers
325 Solvers
3188 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!