Skip to content

Commit d3c3bab

Browse files
refactor 476
1 parent 3242ae9 commit d3c3bab

File tree

1 file changed

+0
-17
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-17
lines changed

src/main/java/com/fishercoder/solutions/_476.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 476. Number Complement
5-
*
6-
* Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.
7-
8-
Note:
9-
The given integer is guaranteed to fit within the range of a 32-bit signed integer.
10-
You could assume no leading zero bit in the integer’s binary representation.
11-
Example 1:
12-
Input: 5
13-
Output: 2
14-
Explanation: The binary representation of 5 is 101 (no leading zero bits), and its complement is 010. So you need to output 2.
15-
Example 2:
16-
Input: 1
17-
Output: 0
18-
Explanation: The binary representation of 1 is 1 (no leading zero bits), and its complement is 0. So you need to output 0.
19-
*/
203
public class _476 {
214

225
public static class Solution1 {

0 commit comments

Comments
 (0)