Skip to content

Commit c723c7d

Browse files
committed
Update GenerateSubsets and ToggleKthBit implementations
1 parent 29ae8bc commit c723c7d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.thealgorithms.bitmanipulation;
22

3+
34
import java.util.ArrayList;
45
import java.util.List;
56

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
/**
44
* The ToggleKthBit class provides a method to toggle the K-th bit of a given number.
5-
*
5+
*
66
* Toggling means: if the K-th bit is 1, it becomes 0; if it's 0, it becomes 1.
7-
*
7+
*
88
* Example:
99
* Input: n = 10 (1010 in binary), k = 1
1010
* Output: 8 (1000 in binary)
11-
*
12-
* @author Rahul
11+
*
12+
* @author Rahul
1313
*/
1414
public final class ToggleKthBit {
1515

0 commit comments

Comments
 (0)