Skip to content

Commit e20b0d0

Browse files
refactor 693
1 parent 5de18a6 commit e20b0d0

File tree

1 file changed

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

1 file changed

+0
-30
lines changed

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

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

3-
/**
4-
* 693. Binary Number with Alternating Bits
5-
*
6-
* Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values.
7-
8-
Example 1:
9-
Input: 5
10-
Output: True
11-
Explanation:
12-
The binary representation of 5 is: 101
13-
14-
Example 2:
15-
Input: 7
16-
Output: False
17-
Explanation:
18-
The binary representation of 7 is: 111.
19-
20-
Example 3:
21-
Input: 11
22-
Output: False
23-
Explanation:
24-
The binary representation of 11 is: 1011.
25-
26-
Example 4:
27-
Input: 10
28-
Output: True
29-
Explanation:
30-
The binary representation of 10 is: 1010.
31-
*/
32-
333
public class _693 {
344
public static class Solution1 {
355
public boolean hasAlternatingBits(int n) {

0 commit comments

Comments
 (0)