⬆️✅faster than 💯% of c++ online submission|| ⬆️⬆️⬆️Upvote if you like
simple bruteforce faster than 100 % of the solution \n1. first find out the length of the linked list then \n2. iteritate to 0 to half of the linked list and up
**simple bruteforce faster than 100 % of the solution **\n1. first find out the length of the linked list then \n2. iteritate to 0 to half of the linked list and update the head of linked list \n3. now return the head (head will be at the middle of the linked list)\n\n\n\n![image](https://assets.leetcode.com/users/images/34061787-80a2-47bf-96b0-215a03ed60fb_1663695370.844914.png)\n\n```\nclass Solution {\npublic:\n    ListNode* middleNode(ListNode* head) {\n       ListNode *temp = head;\n        int N=0;\n        while(temp){\n            N++;\n            temp = temp->next;\n        }\n        cout<<N;\n        for(int i = 0; i < N/2; i++)                           \n            head = head -> next;\n        return head;\n    }\n};\n```\n\n\n# upvote if you like the solution \n
['C++']