From 6241166470a7471cf336d57794e00ca20bf5884a Mon Sep 17 00:00:00 2001 From: TomatoCream Date: Sun, 17 Nov 2019 14:00:29 +0900 Subject: [PATCH] remove redundant fast.next.next check --- epi_judge_python_solutions/is_list_cyclic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epi_judge_python_solutions/is_list_cyclic.py b/epi_judge_python_solutions/is_list_cyclic.py index f1f5ec6ee..6c9c2c67e 100644 --- a/epi_judge_python_solutions/is_list_cyclic.py +++ b/epi_judge_python_solutions/is_list_cyclic.py @@ -15,7 +15,7 @@ def cycle_len(end): return step fast = slow = head - while fast and fast.next and fast.next.next: + while fast and fast.next: slow, fast = slow.next, fast.next.next if slow is fast: # Finds the start of the cycle.