随笔分类 - 力扣
摘要:# [25. K 个一组翻转链表](https://leetcode.cn/problems/reverse-nodes-in-k-group/) 给你链表的头节点 `head` ,每 `k` 个节点一组进行翻转,请你返回修改后的链表。 `k` 是一个正整数,它的值小于或等于链表的长度。如果节点总数
阅读全文
摘要:# [206. 反转链表](https://leetcode.cn/problems/reverse-linked-list/) ==给你单链表的头节点 `head` ,请你反转链表,并返回反转后的链表。== **示例 1:**  ==给你两个按 非递减顺序 排列的整数数组 nums1 和 nums2,另有两个整数 m 和 n ,分别表示 nums1 和 nums2 中的元素数目。== =
阅读全文
摘要:# [283. 移动零](https://leetcode.cn/problems/move-zeroes/) ==给定一个数组 `nums`,编写一个函数将所有 `0` 移动到数组的末尾,同时保持非零元素的相对顺序。== **请注意** ,必须在不复制数组的情况下原地对数组进行操作。 **示例 1
阅读全文
摘要:# [26. 删除有序数组中的重复项](https://leetcode.cn/problems/remove-duplicates-from-sorted-array/) 创建数组 声明数组的语法:数据类型 数组名[数组长度]; 注意:数组长度必须是整数,可以是常量,也可以是**变量和表达式**。
阅读全文