
Three of my accounts recently achieved the #1, #2 and #3 leetcode ratings in South Korea. lol 😂

Leetcode contest speed-run global rank 2nd


3686. Number of Stable Subsequences
You are given an integer array
nums.A subsequence is stable if it does not contain three consecutive elements with the same parity when the subsequence is read in order (i.e., consecutive inside the subsequence).
Return the number of stable subsequences.
Since the answer may be too large, return it modulo
109 + 7.
3685. Subsequence Sum After Capping Elements
You are given an integer array
numsof sizenand a positive integerk.An array capped by value
xis obtained by replacing every elementnums[i]withmin(nums[i], x).For each integer
xfrom 1 ton, determine whether it is possible to choose a subsequence from the array capped byxsuch that the sum of the chosen elements is exactlyk.Return a 0-indexed boolean array
answerof sizen, whereanswer[i]istrueif it is possible when usingx = i + 1, andfalseotherwise.
3684. Maximize Sum of At Most K Distinct Elements
You are given a positive integer array
numsand an integerk.Choose at most
kelements fromnumsso that their sum is maximized. However, the chosen numbers must be distinct.Return an array containing the chosen numbers in strictly descending order.
3683. Earliest Time to Finish One Task
You are given a 2D integer array
taskswheretasks[i] = [si, ti].Each
[si, ti]intasksrepresents a task with start timesithat takestiunits of time to finish.Return the earliest time at which at least one task is finished.