Problem 2202. Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').
Solution Stats
Problem Comments
-
2 Comments
David Young
on 20 Feb 2014
The test suite does not check that the solution is a character string, but the problem definition requires that it should.
the cyclist
on 20 Feb 2014
Added this check. (I messed it up a bit the first time I tried to do it, so sorry for some interim weirdness.)
Solution Comments
Show commentsProblem Recent Solvers286
Suggested Problems
-
Return the 3n+1 sequence for n
8102 Solvers
-
Number of 1s in a binary string
8238 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1012 Solvers
-
1073 Solvers
-
567 Solvers
More from this Author23
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!