摘要:
题目地址:https://leetcode-cn.com/problems/remove-element/ 解题思路:设置新的下标 class Solution { public: int removeElement(vector<int>& nums, int val) { if (nums.si 阅读全文
摘要:
题目地址:https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/ 解题思路:设计标记。 class Solution { public: int removeDuplicates(vector<int>& nums) 阅读全文
摘要:
题目地址:https://leetcode-cn.com/problems/reverse-nodes-in-k-group/ 解题思路:增加头结点,通过头结点来实现倒序。 class Solution { public: ListNode* reverseKGroup(ListNode* head 阅读全文