diff --git a/java/Chapter 2/Question2_6/Question.java b/java/Chapter 2/Question2_6/Question.java index 6bee5ef4..b7f64eeb 100644 --- a/java/Chapter 2/Question2_6/Question.java +++ b/java/Chapter 2/Question2_6/Question.java @@ -18,7 +18,7 @@ public static LinkedListNode FindBeginning(LinkedListNode head) { } // Error check - there is no meeting point, and therefore no loop - if (fast == null || fast.next == null) { + if (fast == null || fast.next == null || fast.next.next == null) { return null; }