Update detect_cycle_II.py

This commit is contained in:
marina 2023-08-07 15:45:14 -07:00 committed by GitHub
parent 907bf738ec
commit 1c51827e08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,13 +3,13 @@
# author: bt3gl
class ListNode:
class Node:
def __init__(self, x):
self.val = x
self.next = None
def detectCycle(self, head):
def detect_cycle(self, head):
seen = set()
node = head