xinyu04

导航

上一页 1 2 3 4 5 6 7 8 9 ··· 30 下一页

2022年9月25日 #

[Oracle] LeetCode 253 Meeting Rooms II 优先队列

摘要: Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of conference rooms required. Soluti 阅读全文

posted @ 2022-09-25 20:47 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑

2022年9月17日 #

LeetCode 128 Longest Consecutive Sequence

摘要: Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in $O( 阅读全文

posted @ 2022-09-17 04:08 Blackzxy 阅读(3) 评论(0) 推荐(0) 编辑

LeetCode 1231 Divide Chocolate 二分答案

摘要: You have one chocolate bar that consists of some chunks. Each chunk has its own sweetness given by the array sweetness. You want to share the chocolat 阅读全文

posted @ 2022-09-17 03:13 Blackzxy 阅读(31) 评论(0) 推荐(0) 编辑

2022年9月16日 #

LeetCode 1182 Shortest Distance to Target Color 二分

摘要: You are given an array colors, in which there are three colors: 1, 2 and 3. You are also given some queries. Each query consists of two integers i and 阅读全文

posted @ 2022-09-16 16:53 Blackzxy 阅读(10) 评论(0) 推荐(0) 编辑

2022年9月15日 #

LeetCode 452 Minimum Number of Arrows to Burst Balloons

摘要: There are some spherical balloons taped onto a flat wall that represents the XY-plane. The balloons are represented as a 2D integer array points where 阅读全文

posted @ 2022-09-15 20:40 Blackzxy 阅读(20) 评论(0) 推荐(0) 编辑

LeetCode 1588 Sum of All Odd Length Subarrays 前缀和

摘要: Given an array of positive integers arr, return the sum of all possible odd-length subarrays of arr. A subarray is a contiguous subsequence of the arr 阅读全文

posted @ 2022-09-15 17:22 Blackzxy 阅读(9) 评论(0) 推荐(0) 编辑

LeetCode 1151 Minimum Swaps to Group All 1's Together 滑动窗口

摘要: Given a binary array data, return the minimum number of swaps required to group all 1’s present in the array together in any place in the array. Solut 阅读全文

posted @ 2022-09-15 04:22 Blackzxy 阅读(10) 评论(0) 推荐(0) 编辑

LeetCode 325 Maximum Size Subarray Sum Equals k 贪心+Map

摘要: Given an integer array nums and an integer k, return the maximum length of a subarray that sums to k. If there is not one, return 0 instead. Solution 阅读全文

posted @ 2022-09-15 03:44 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑

LeetCode 1901 Find a Peak Element II 二分

摘要: A peak element in a 2D grid is an element that is strictly greater than all of its adjacent neighbors to the left, right, top, and bottom. Given a $0$ 阅读全文

posted @ 2022-09-15 02:07 Blackzxy 阅读(15) 评论(0) 推荐(0) 编辑

2022年9月14日 #

LeetCode 1060 Missing Element in Sorted Array 二分

摘要: Given an integer array nums which is sorted in ascending order and all of its elements are unique and given also an integer k, return the kth missing 阅读全文

posted @ 2022-09-14 22:13 Blackzxy 阅读(17) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 30 下一页