MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Given an unsigned integer x, find the largest y by rearranging the bits in x.

Example:

Input x = 10 Output y is 12

since 10 in binary is 1010 and 12 in binary is 1100.

417 correct solutions
220 incorrect solutions

Last solution submitted on Jul 29, 2015

4 players like this problem

2 Comments