摘要:
```c++ ListNode *insertionSortList(ListNode *head) { if (head == nullptr || head->next == nullptr) return head; auto *prehead = new ListNode(0), *front = prehead; prehead->next = h... 阅读全文
摘要:
方法一 活用set 方法二 快慢指针找中点然后反转后半部分链表,然后插入到前半个链表当中去 阅读全文
摘要:
```c++
TreeNode *BST(ListNode *begin, ListNode *end) { if (begin == end) return nullptr; ListNode *fast = begin, *slow = begin; while (fast->next != end) { fast = fast->nex... 阅读全文