Problem 1295. Bit Reversal
Solution Stats
Problem Comments
Solution Comments
-
1 Comment
Great problem to practice working with binary!
-
3 Comments
From now on, anytime I can chain together a composition of functions, I will never exceed a Cody score of 12! Thank you!
I also would encourage people not to submit this sort of dynamic expression regexp trick solutions indiscriminately. Having said that, and just for reference, you can push this down to a Cody score of 10... (hint1: use varargin; hint2: use 'command syntax' instead of 'function syntax').
To keep Cody from degenerating into a bunch of unreadable party tricks, we've blocked usage of eval, evalc, and a few others. But regexp is too important for us to block, so this trick will remain available into the foreseeable future. Which means, to back up Alfonso's comment, please don't abuse it. It's funny once, and then it just gets annoying.
Problem Recent Solvers946
Suggested Problems
-
Get the area codes from a list of phone numbers
899 Solvers
-
2385 Solvers
-
Get the elements of diagonal and antidiagonal for any m-by-n matrix
435 Solvers
-
279 Solvers
-
convert matrix to single column
375 Solvers
More from this Author56
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!