The correct answer is not really defined for x = 1, that is a one-sided polygon.
The test cases are insufficient.
2212 Solvers
Given an unsigned integer x, find the largest y by rearranging the bits in x
795 Solvers
578 Solvers
276 Solvers
120 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!