hling_so的博客带虚拟头结点的单链表结点结构如下: struct ListNode { int data; ListNode *next; }; 链表类接口如下: class List { ... List() ... head = new ListNode;... head->next = NULL;... }~List
哈哈哈哈嘿嘿嘿的博客Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node