Skip to content

Commit 17c60c6

Browse files
feature:Add SwapNumbersUsingXor algo with JUnit test
1 parent c233833 commit 17c60c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
*
2626
* After these three steps, the values of a and b are swapped.
2727
*
28-
* <b>Example usage:</b>
28+
* For more information, refer to the
29+
* <a href="https://en.wikipedia.org/wiki/XOR_swap_algorithm"> XOR swap algorithm </a>.
30+
*
31+
* Example usage:
2932
* <code>
3033
* int[] result = SwapNumbersUsingXor.swap(5, 3);<br>
3134
* System.out.println("After swap: a = " + result[0] + ", b = " + result[1]);

0 commit comments

Comments
 (0)