mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 20:26:07 -04:00
Update detect_cycle_II.py
This commit is contained in:
parent
907bf738ec
commit
1c51827e08
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user