合集-LeetCode Hot100

摘要:1.两数之和 https://leetcode.cn/problems/two-sum/description/?envType=study-plan-v2&envId=top-100-liked public int[] twoSum(int[] nums, int target) { HashM 阅读全文
posted @ 2024-03-07 16:53 jeasonGo 阅读(61) 评论(0) 推荐(0)
摘要:283. 移动零 https://leetcode.cn/problems/move-zeroes/description/?envType=study-plan-v2&envId=top-100-liked public void moveZeroes(int[] nums) { int r = 阅读全文
posted @ 2024-03-10 23:01 jeasonGo 阅读(85) 评论(0) 推荐(0)
摘要:73. 矩阵置零 https://leetcode.cn/problems/set-matrix-zeroes/description/?envType=study-plan-v2&envId=top-100-liked public void setZeroes(int[][] matrix) { 阅读全文
posted @ 2024-03-14 18:58 jeasonGo 阅读(47) 评论(0) 推荐(0)
摘要:35. 搜索插入位置 https://leetcode.cn/problems/search-insert-position/description/?envType=study-plan-v2&envId=top-100-liked public int searchInsert(int[] nu 阅读全文
posted @ 2024-03-22 09:55 jeasonGo 阅读(53) 评论(0) 推荐(0)
摘要:215. 数组中的第K个最大元素 https://leetcode.cn/problems/kth-largest-element-in-an-array/description/?envType=study-plan-v2&envId=top-100-liked public int findKt 阅读全文
posted @ 2024-03-23 09:59 jeasonGo 阅读(65) 评论(0) 推荐(0)
摘要:155. 最小栈 https://leetcode.cn/problems/min-stack/description/?envType=study-plan-v2&envId=top-100-liked class MinStack { Deque<Integer> deque; Priority 阅读全文
posted @ 2024-03-24 14:46 jeasonGo 阅读(68) 评论(0) 推荐(0)
摘要:53. 最大子数组和 https://leetcode.cn/problems/maximum-subarray/description/?envType=study-plan-v2&envId=top-100-liked public int maxSubArray(int[] nums) { i 阅读全文
posted @ 2024-03-26 16:09 jeasonGo 阅读(41) 评论(0) 推荐(0)
摘要:70. 爬楼梯 https://leetcode.cn/problems/climbing-stairs/description/?envType=study-plan-v2&envId=top-100-liked public int climbStairs(int n) { if (n <= 1 阅读全文
posted @ 2024-03-29 11:04 jeasonGo 阅读(80) 评论(0) 推荐(0)