摘要: 描述 You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in 阅读全文
posted @ 2022-07-19 23:59 IslandZzzz 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 描述 Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors 阅读全文
posted @ 2022-07-19 22:35 IslandZzzz 阅读(15) 评论(0) 推荐(0) 编辑
摘要: // 递归处理, 利用函数作用域操作当前节点和当前节点的下一个节点 const reverseList = head => { if (head == null || head.next == null) return head const end = reverseList(head.next) 阅读全文
posted @ 2022-07-19 14:36 IslandZzzz 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice. 阅读全文
posted @ 2022-07-19 11:27 IslandZzzz 阅读(11) 评论(0) 推荐(0) 编辑