Skip to content

Commit 3abc42e

Browse files
committed
Fixed JavaDoc
1 parent 42c1fd6 commit 3abc42e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/com/rampatra/linkedlists/CloneWithRandPointers.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
import com.rampatra.base.DoubleLinkedNode;
55

66
/**
7-
* Created by IntelliJ IDEA.
7+
* Find the <a href="http://www.geeksforgeeks.org/a-linked-list-with-next-and-arbit-pointer/">question here</a>.
88
*
99
* @author rampatra
1010
* @since 6/20/15
11-
* @time: 1:00 PM
12-
* @see: http://www.geeksforgeeks.org/a-linked-list-with-next-and-arbit-pointer/
1311
*/
1412
public class CloneWithRandPointers {
1513

@@ -45,7 +43,7 @@ public static <E extends Comparable<E>> DoubleLinkedList<E> clone(DoubleLinkedLi
4543
DoubleLinkedNode<E> dupNode;
4644
while (curr != null && curr.next != null) {
4745
dupNode = curr.next;
48-
curr.next = (dupNode != null) ? dupNode.next : null;
46+
curr.next = dupNode.next;
4947
dupNode.next = (curr.next != null) ? curr.next.next : null;
5048
curr = curr.next;
5149
}

0 commit comments

Comments
 (0)