-
5 Comments
The solution is not correct for the generalized case. 0$0 does a pre-pend of 0 not an append. The correct general solutions is either $00, or better to avoid operator ($0) confusion with the test set using 0s is operator ($%) $&0.
The solution is not correct for the generalized case. 0$0 does a pre-pend of 0 not an append. The correct general solutions is either $00, or better to avoid operator ($0) confusion with the test set using 0s is operator ($&) $&0. (Typo in prior comment)
The problem asks to "add" a zero, no mention of append or prepend! Nice general solution though, and a new trick learned ($&0)
Suggested Problems
-
193 Solvers
-
Make an awesome ramp for a tiny motorcycle stuntman
683 Solvers
-
Pig Latin to English Translator
157 Solvers
-
320 Solvers
-
Rounding off numbers to n decimals
4818 Solvers
More from this Author43
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!