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 4476b30 commit 6735c60Copy full SHA for 6735c60
src/me/ramswaroop/linkedlists/PairWiseSwap.java
@@ -14,9 +14,9 @@ public class PairWiseSwap {
14
15
/**
16
* Recursively swaps adjacent nodes of a linked list.
17
- * The swapping is done in place.
18
*
19
* @param node
+ * @return new starting node after swapping adjacent nodes.
20
*/
21
public static <E extends Comparable<E>> SingleLinkedNode<E> pairWiseSwap(SingleLinkedNode<E> node) {
22
if (node == null || node.next == null) return node;
0 commit comments