✔️ Python 2 Easy Way To Find Middle of the Linked List | 93% Faster | Fast and Simple Solution
IF YOU FIND THIS POST HELPFUL PLEASE UPVOTE \uD83D\uDC4D\n\n\nBrute Force Approach:\n\nclass Solution:\n    def middleNode(self, head: Optional[ListNode]) -> Op
**IF YOU FIND THIS POST HELPFUL PLEASE UPVOTE \uD83D\uDC4D**\n\n\n**Brute Force Approach:**\n```\nclass Solution:\n    def middleNode(self, head: Optional[ListNode]) -> Optional[ListNode]:\n        count = 0\n      **  tmp = head\n        while tmp:\n            count+=1\n            tmp = tmp.next\n            \n        middle = count//2\n        l = 0\n        while l < middle:\n            head = head.next\n            l+=1\n        return head\n```\n\n**Optimal Approach Using Two Pointers:**\n```\nclass Solution:\n    def middleNode(self, head: Optional[ListNode]) -> Optional[ListNode]:\n        slow = head\n        fast = head\n        \n        while fast and fast.next:\n            slow = slow.next\n            fast = fast.next.next\n            \n        return slow\n```\n**Visit this blog to learn Python tips and techniques and to find a Leetcode solution with an explanation:  https://www.python-techs.com/**
['Two Pointers', 'Python', 'Python3']