      "class MyLinkedList(LinkedList):\n",
      "\n",
      "    def find_loop_start(self):\n",
      "        if self.head is None or self.head.next is None:\n",
      "            return\n",
      "        i = self.head\n",
      "        j = self.head\n",
      "        i = i.next\n",
      "        j = j.next.next\n",
      "\n",
      "        # Increment i and j until they meet\n",
      "        # j is incremented twice as fast as i\n",
      "        while j != i:\n",
      "            i = i.next\n",
      "            if j is None or j.next is None:\n",
      "                return\n",
      "            j = j.next.next\n",
      "\n",
      "        # When i and j meet, move j to the head\n",
      "        j = self.head\n",
      "\n",
      "        # Increment i and j one node at a time until\n",
      "        # they meet, which is the start of the loop\n",
      "        while j != i:\n",
      "            i = i.next\n",
      "            j = j.next\n",
      "        return i.data"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
 
</s> remove     "* Use two pointers i, j, initialized to the head\n",
    "* Increment i and j until they meet\n",
    "    * j is incremented twice as fast as i\n",
    "        * If j's next is None, we do not have a circular list\n",
    "* When i and j meet, move j to the head\n",
    "* Increment i and j one node at a time until they meet\n",
 </s> add     "* Use two references `slow`, `fast`, initialized to the `head`\n",
    "* Increment `slow` and `fast` until they meet\n",
    "    * `fast` is incremented twice as fast as `slow`\n",
    "        * If `fast.next` is `None`, we do not have a circular list\n",
    "* When `slow` and `fast` meet, move `slow` to the `head`\n",
    "* Increment `slow` and `fast` one node at a time until they meet\n", </s> remove    "display_name": "Python 2",
 </s> add    "display_name": "Python 3", </s> remove    "name": "python2"
 </s> add    "name": "python3" </s> remove     "version": 2
 </s> add     "version": 3 </s> remove    "pygments_lexer": "ipython2",
   "version": "2.7.10"
 </s> add    "pygments_lexer": "ipython3",
   "version": "3.4.3"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
      "class MyLinkedList(LinkedList):\n",
      "\n",
      "    def find_loop_start(self):\n",
      "        if self.head is None or self.head.next is None:\n",
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
    "            return None\n",
    "        slow = self.head\n",
    "        fast = self.head\n",
    "        while fast.next is not None:\n",
    "            slow = slow.next\n",
    "            fast = fast.next.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "            if slow.data == fast.data:\n",
    "                break\n",
    "        slow = self.head\n",
    "        while slow.data != fast.data:\n",
    "            slow = slow.next\n",
    "            fast = fast.next\n",
    "            if fast is None:\n",
    "                return None\n",
    "        return slow.data"
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Polish find loop start solution. 
linked_lists/find_loop_start/find_loop_start_solution.ipynb