Hello Samantha,
I think you should change "assert(isequal(your_fcn_name(x),y_correct))
" to "assert(isequal(your_fcn_name(n),y_correct))"
I made the suggested change to the test suite and re-scored.
Good
I believe there is some tricky code in the test suite that has to be overcome by hacking the Cody Scoring server, and execute a function your_fcn_name before it is even called. Or a mechanism to change all x's in n's.
Given an unsigned integer x, find the largest y by rearranging the bits in x
795 Solvers
Back to basics 11 - Max Integer
680 Solvers
Create a vector whose elements depend on the previous element
396 Solvers
519 Solvers
207 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!