From 6a2cb0927aa9931486d555b4a4e18157e629c3e1 Mon Sep 17 00:00:00 2001 From: Nehul Yadav Date: Mon, 19 Dec 2016 23:31:18 +0400 Subject: [PATCH] Update Question.java --- java/Chapter 2/Question2_6/Question.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }