Python two pointer, extremely simple, with explaination
\n    def middleNode(self, head):\n        tmp = head\n        while tmp and tmp.next:\n            head = head.next\n            tmp = tmp.next.next\n        r
\n    def middleNode(self, head):\n        tmp = head\n        while tmp and tmp.next:\n            head = head.next\n            tmp = tmp.next.next\n        return head\n\t\t\t\t\nWe need two pointers, one is head with one step each iteration, and the other is tmp with two steps each iteration. So when the tmp reaches the end of the list, the head just reaches the half of it, which is exactly what we want. \n\nAnd one thing needs to be considered additionaly is that the number of the node can be odd and even, which may affect the termination condition of the iteration. To solve this, my idea is to try the algorithm in some small set of the examples, like the examples provided by the official. And you will find that if the tmp reaches Null or tmp.next reaches Null, the head is the result.
[]