From 67656b197d772282698305d7d128baa6fac6dda1 Mon Sep 17 00:00:00 2001 From: marina <138340846+bt3gl-cryptographer@users.noreply.github.com> Date: Wed, 2 Aug 2023 16:40:19 -0700 Subject: [PATCH] Update detect_cycle.py --- linked_lists/detect_cycle.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linked_lists/detect_cycle.py b/linked_lists/detect_cycle.py index ebd28ed..8cce3e5 100644 --- a/linked_lists/detect_cycle.py +++ b/linked_lists/detect_cycle.py @@ -2,6 +2,12 @@ # -*- coding: utf-8 -*- # author: bt3gl +class tNode: + + def __init__(self, val): + self.val = val + self.next = None + def has_cycle(self, head) -> bool: