Skip to content

Commit e9580a3

Browse files
clang formater solved
1 parent 5d1ac83 commit e9580a3

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/main/java/com/thealgorithms/bitmanipulation/HighestSetBit.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33

44
/**
55
* Find Highest Set Bit
6+
*
7+
* This function calculates the position (or index) of the highest set bit (the leftmost 1 bit)
8+
* in a given binary number.
9+
*
610
* @author Bama Charan Chhandogi (https://github.com/BamaCharanChhandogi)
711
*/
812

13+
914
public final class HighestSetBit {
1015
private HighestSetBit() {
1116
}
@@ -27,4 +32,4 @@ public final static Optional<Integer> findHighestSetBit(int num) {
2732

2833
return Optional.of(position - 1);
2934
}
30-
}
35+
}

src/test/java/com/thealgorithms/bitmanipulation/HighestSetBitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ void testHighestSetBit() {
3434
assertEquals(9, HighestSetBit.findHighestSetBit(512).get());
3535
assertThrows(IllegalArgumentException.class, () -> HighestSetBit.findHighestSetBit(-37));
3636
}
37-
}
37+
}

0 commit comments

Comments
 (0)