We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55b9080 commit 8db4ef9Copy full SHA for 8db4ef9
Others/BrianKernighanAlgorithm.java
@@ -4,7 +4,7 @@
4
*
5
* @author Nishita Aggarwal
6
7
- * Brian Kernighan’s Algorithm
+ * Brian Kernighan’s Algorithm
8
* algorithm to count the number of set bits in a given number
9
* Subtraction of 1 from a number toggles all the bits (from
10
* right to left) till the rightmost set bit(including the
@@ -24,10 +24,10 @@
24
public class BrianKernighanAlgorithm {
25
26
/**
27
- * @param num: number in which we count the set bits
28
- *
29
- * @return int: Number of set bits
30
- * */
+ * @param num: number in which we count the set bits
+ *
+ * @return int: Number of set bits
+ * */
31
static int countSetBits(int num)
32
{
33
int cnt = 0;
0 commit comments