【Leetcode题解】2599. Make the Prefix Sum Non-negative

Posted on Thu 23 March 2023 in Leetcode

Leetcode 2599 Make the Prefix Sum Non-negative My Solution 我的解题思路。这道题主要用贪心算法(greedy)和最小堆(min-heap)结合起来去求解。


Continue reading

【Leetcode题解】Weekly Contest 337 周赛题目解析

Posted on Sun 19 March 2023 in Leetcode • Tagged with Contest

2023-03 Leetcode Weekly Contest 337 | 2595. Number of Even and Odd Bits | 2596. Check Knight Tour Configuration | 2597. The Number of Beautiful Subsets | 2598. Smallest Missing Non-negative Integer After Operations | My solution 我的题目解析


Continue reading

【Leetcode题解】Biweekly Contest 100 双周赛题目解析

Posted on Sat 18 March 2023 in Leetcode • Tagged with Contest

2023-03 Leetcode Biweekly Contest 100 | 2591. Distribute Money to Maximum Children | 2592. Maximize Greatness of an Array | 2593. Find Score of an Array After Marking All Elements | 2594. Minimum Time to Repair Cars | My solution 我的题目解析


Continue reading

【Leetcode题解】2580. Count Ways to Group Overlapping Ranges

Posted on Tue 14 March 2023 in Leetcode • Tagged with Contest, Math

2023-03 - Biweekly Contest 99 - Leetcode 2580 Count Ways to Group Overlapping Ranges - 计算重叠范围的分组方式 - 我的解法,思路和方法


Continue reading

【Leetcode题解】2588. Count the Number of Beautiful Subarrays

Posted on Sun 12 March 2023 in Leetcode • Tagged with Contest, Subarray

2023-03 Weekly Contest 336 Leetcode 2588 Count the Number of Beautiful Subarrays 我的解题思路


Continue reading

【Leetcode题解】2589. Minimum Time to Complete All Tasks

Posted on Sun 12 March 2023 in Leetcode • Tagged with Contest, Scheduling

2023-03 Weekly Contest 336 Leetcode 2589 Minimum Time to Complete All Tasks My Solution 我的解题思路


Continue reading

【Leetcode题解】2584. Split the Array to Make Coprime Products

Posted on Wed 08 March 2023 in Leetcode • Tagged with Contest, Math

又闲的无聊,找点事情做,来写一下2584. Split the Array to Make Coprime Products的题解。

题目

You are given a 0-indexed integer array nums of length n.

A split at an index i where 0 <= i <= n - 2 is …


Continue reading

【Leetcode题解】2444. Count Subarrays With Fixed Bound

Posted on Sat 04 March 2023 in Leetcode • Tagged with Contest, Subarray

今天闲的无聊,找点事情做,来写一下2444. Count Subarrays With Fixed Bound的题解。

题目

You are given an integer array nums and two integers minK and maxK.

A fixed-bound subarray of nums is a subarray that satisfies the …


Continue reading