original_docstring: 
          Two pointer solution
  
          Keep two pointers fast and slow
          TODO: Understand this
          
docstring: Two pointer solution
  Keep two pointers fast and slow
  TODO: Understand this
docstring_tokens: Two pointer solution Keep two pointers fast and slow TODO : Understand this
code: def two_pointer_soln(self, head: ListNode) -> ListNode:
          """
          Two pointer solution
  
          Keep two pointers fast and slow
          TODO: Understand this
          """
          fast = slow = head
          while fast and fast.next:
              fast = fast.next.next
              slow = slow.next
              # if there is a cycle
              if slow == fast:
                  # slow2 and slow nodes move step by step
                  slow2 = head
                  while slow2:
                      if slow2 == slow:
                          return slow2
                      slow2 = slow2.next
                      slow = slow.next
          return None
code_tokens: def two_pointer_soln ( self , head : ListNode ) -> ListNode : fast = slow = head while fast and fast . next : fast = fast . next . next slow = slow . next if slow == fast : slow2 = head while slow2 : if slow2 == slow : return slow2 slow2 = slow2 . next slow = slow . next return None
short_docstring: Two pointer solution
  Keep two pointers fast and slow
  TODO: Understand this
short_docstring_tokens: Two pointer solution Keep two pointers fast and slow TODO : Understand this
comment: """
          Two pointer solution
  
          Keep two pointers fast and slow
          TODO: Understand this
          """$SEP$# if there is a cycle$SEP$# slow2 and slow nodes move step by step