7 kyu
Ones' Complement
1,133 of 2,571marbiru
Description:
The Ones' Complement of a binary number is the number obtained by swapping all the 0s for 1s and all the 1s for 0s.
For any given binary number,formatted as a string, return the Ones' Complement of that number.
Examples
"0" -> "1"
"1" -> "0"
"000" -> "111"
"1001" -> "0110"
"1001" -> "0110"
Fundamentals
Similar Kata:
Stats:
Created | Sep 7, 2017 |
Published | Sep 7, 2017 |
Warriors Trained | 3138 |
Total Skips | 16 |
Total Code Submissions | 4423 |
Total Times Completed | 2571 |
JavaScript Completions | 1133 |
C# Completions | 320 |
Python Completions | 1049 |
Ruby Completions | 87 |
C Completions | 87 |
COBOL Completions | 11 |
Total Stars | 21 |
% of votes with a positive feedback rating | 93% of 506 |
Total "Very Satisfied" Votes | 440 |
Total "Somewhat Satisfied" Votes | 59 |
Total "Not Satisfied" Votes | 7 |
Total Rank Assessments | 15 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |