Skip to content

Commit 07c3256

Browse files
refactor 600
1 parent 332205d commit 07c3256

File tree

1 file changed

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

1 file changed

+0
-20
lines changed

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

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

3-
/**
4-
* 600. Non-negative Integers without Consecutive Ones
5-
*
6-
* Given a positive integer n, find the number of non-negative integers less than or equal to n, whose binary representations do NOT contain consecutive ones.
7-
8-
Example 1:
9-
Input: 5
10-
Output: 5
11-
Explanation:
12-
Here are the non-negative integers <= 5 with their corresponding binary representations:
13-
0 : 0
14-
1 : 1
15-
2 : 10
16-
3 : 11
17-
4 : 100
18-
5 : 101
19-
Among them, only integer 3 disobeys the rule (two consecutive ones) and the other 5 satisfy the rule.
20-
21-
Note: 1 <= n <= 109
22-
*/
233
public class _600 {
244

255
public static class Solution1 {

0 commit comments

Comments
 (0)