leetcode链接 876. 链表的中间结点
struct ListNode {int val;struct ListNode* next;
};
typedef struct ListNode ListNode;ListNode* MiddleNode(ListNode* head) {ListNode* slow = head,* quick = head;while (quick && quick->next) {slow = slow->next;quick = quick->next->next;}return slow;
}