| 3009 |
Maximum Number of Intersections on the Chart |
C++ Python |
O(nlogn) |
O(n) |
Hard |
🔒 |
Sort, Line Sweep, Coordinate Compression |
| 3010 |
Divide an Array Into Subarrays With Minimum Cost I |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array, Quick Select |
| 3015 |
Count the Number of Houses at a Certain Distance I |
C++ Python |
O(n) |
O(n) |
Medium |
|
Math, Prefix Sum, Difference Array |
| 3017 |
Count the Number of Houses at a Certain Distance II |
C++ Python |
O(n) |
O(1) |
Hard |
|
Math, Prefix Sum, Difference Array |
| 3026 |
Maximum Good Subarray Sum |
C++ Python |
O(n) |
O(n) |
Medium |
|
Prefix Sum |
| 3028 |
Ant on the Boundary |
C++ Python |
O(n) |
O(1) |
Easy |
|
Prefix Sum |
| 3030 |
Find the Grid of Region Average |
C++ Python |
O(m * n) |
O(m * n) |
Medium |
|
Array |
| 3033 |
Modify the Matrix |
C++ Python |
O(m * n) |
O(1) |
Easy |
|
Array |
| 3038 |
Maximum Number of Operations With the Same Score I |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3065 |
Minimum Operations to Exceed Threshold Value I |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3069 |
Distribute Elements Into Two Arrays I |
C++ Python |
O(n) |
O(n) |
Easy |
|
Array |
| 3070 |
Count Submatrices with Top-Left Element and Sum Less Than k |
C++ Python |
O(n * m) |
O(1) |
Medium |
|
Array, Prefix Sum |
| 3071 |
Minimum Operations to Write the Letter Y on a Grid |
C++ Python |
O(n^2) |
O(1) |
Medium |
|
Array |
| 3079 |
Find the Sum of Encrypted Integers |
C++ Python |
O(nlogr) |
O(1) |
Easy |
|
Array |
| 3096 |
Minimum Levels to Gain More Points |
C++ Python |
O(n) |
O(n) |
Medium |
|
Prefix Sum |
| 3105 |
Longest Strictly Increasing or Strictly Decreasing Subarray |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3127 |
Make a Square with the Same Color |
C++ Python |
O((n - w + 1)^2 * w^2) |
O(1) |
Easy |
|
Array |
| 3131 |
Find the Integer Added to Array I |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3142 |
Check if Grid Satisfies Conditions |
C++ Python |
O(m * n) |
O(1) |
Easy |
|
Array |
| 3147 |
Taking Maximum Energy From the Mystic Dungeon |
C++ Python |
O(n) |
O(1) |
Medium |
|
Array |
| 3151 |
Special Array I |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3152 |
Special Array II |
C++ Python |
O(n + q) |
O(n) |
Medium |
|
Prefix Sum |
| 3153 |
Sum of Digit Differences of All Pairs |
C++ Python |
O(nlogr) |
O(10 * logr) |
Medium |
|
Prefix Sum |
| 3159 |
Find Occurrences of an Element in an Array |
C++ Python |
O(n + q) |
O(n) |
Medium |
|
Array |
| 3173 |
Bitwise OR of Adjacent Elements |
C++ Python |
O(n) |
O(1) |
Easy |
🔒 |
Array |
| 3187 |
Peaks in Array |
C++ Python |
O(n + qlogn) |
O(n) |
Hard |
|
BIT, Fenwick Tree |
| 3195 |
Find the Minimum Area to Cover All Ones I |
C++ Python |
O(n * m) |
O(1) |
Medium |
|
Array |
| 3224 |
Minimum Array Changes to Make Differences Equal |
C++ Python |
O(n + k) |
O(k) |
Medium |
|
Prefix Sum, Difference Array |
| 3279 |
Maximum Total Area Occupied by Pistons |
C++ Python |
O(h) |
O(h) |
Hard |
🔒 |
Line Sweep, Difference Array |
| 3285 |
Find Indices of Stable Mountains |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3300 |
Minimum Element After Replacement With Digit Sum |
C++ Python |
O(nlogr) |
O(1) |
Easy |
|
Array |
| 3330 |
Find the Original Typed String I |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3334 |
Find the Maximum Factor Score of Array |
C++ Python |
O(nlogr) |
O(n) |
Medium |
|
Prefix Sum |
| 3349 |
Adjacent Increasing Subarrays Detection I |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3350 |
Adjacent Increasing Subarrays Detection II |
C++ Python |
O(n) |
O(1) |
Medium |
|
Array |
| 3353 |
Minimum Total Operations |
C++ Python |
O(n) |
O(1) |
Easy |
🔒 |
Array |
| 3354 |
Make Array Elements Equal to Zero |
C++ Python |
O(n) |
O(n) |
Easy |
CodeChef Starters 146 - Bouncing Ball |
Prefix Sum |
| 3355 |
Zero Array Transformation I |
C++ Python |
O(n + q) |
O(n) |
Medium |
|
Line Sweep |
| 3361 |
Shift Distance Between Two Strings |
C++ Python |
O(n + 26) |
O(26) |
Medium |
|
Prefix Sum |
| 3379 |
Transformed Array |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3380 |
Maximum Area Rectangle With Point Constraints I |
C++ Python |
O(nlogn) |
O(n) |
Medium |
|
Sort, Brute Force, BIT, Fenwick Tree, Hash Table |
| 3382 |
Maximum Area Rectangle With Point Constraints II |
C++ Python |
O(nlogn) |
O(n) |
Hard |
|
Sort, BIT, Fenwick Tree, Hash Table |
| 3386 |
Button with Longest Push Time |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3392 |
Count Subarrays of Length Three With a Condition |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3400 |
Maximum Number of Matching Indices After Right Shifts |
C++ Python |
O(n^2) |
O(1) |
Medium |
🔒 |
Brute Force |
| 3417 |
Zigzag Grid Traversal With Skip |
C++ Python |
O(n * m) |
O(1) |
Easy |
|
Array |
| 3423 |
Maximum Difference Between Adjacent Elements in a Circular Array |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3427 |
Sum of Variable Length Subarrays |
C++ Python |
O(n) |
O(n) |
Easy |
|
Difference Array |
| 3432 |
Count Partitions with Even Sum Difference |
C++ Python |
O(n) |
O(1) |
Easy |
|
Prefix Sum |
| 3440 |
Reschedule Meetings for Maximum Free Time II |
C++ Python |
O(n) |
O(1) |
Medium |
|
Array |
| 3446 |
Sort Matrix by Diagonals |
C++ Python |
O(n^2 * logn) |
O(n^2) |
Medium |
|
Array, Sort |
| 3452 |
Sum of Good Numbers |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3467 |
Transform Array by Parity |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3502 |
Minimum Cost to Reach Every Position |
C++ Python |
O(n) |
O(1) |
Easy |
|
Prefix Sum |
| 3514 |
Number of Unique XOR Triplets II |
C++ Python |
O(nlogn) |
O(n) |
Medium |
|
Fast Walsh–Hadamard Transform, FWHT, Fast Subset Transform, FST, Hash Table |
| 3531 |
Count Covered Buildings |
C++ Python |
O(n) |
O(n) |
Medium |
|
Array |
| 3537 |
Fill a Special Grid |
C++ Python |
O(4^n) |
O(1) |
Medium |
|
Divide and Conquer, Array |
| 3540 |
Minimum Time to Visit All Houses |
C++ Python |
O(n + q) |
O(n) |
Medium |
🔒 |
Prefix Sum |
| 3546 |
Equal Sum Grid Partition I |
C++ Python |
O(m * n) |
O(1) |
Medium |
|
Array |
| 3548 |
Equal Sum Grid Partition II |
C++ Python |
O(m * n) |
O(m * n) |
Hard |
|
Array, Hash Table |
| 3549 |
Multiply Two Polynomials |
C++ Python |
O((n + m) * log(n + m)) |
O(n + m) |
Hard |
🔒 |
Fast Fourier Transform, FFT |
| 3550 |
Smallest Index With Digit Sum Equal to Index |
C++ Python |
O(nlogr) |
O(1) |
Easy |
|
Array |
| 3569 |
Maximize Count of Distinct Primes After Split |
C++ Python |
O(r + nlogn + qlogn) |
O(r + n) |
Medium |
|
Number Theory, BST, Sorted List, Segment Tree |
| 3637 |
Trionic Array I |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3643 |
Flip Square Submatrix Vertically |
C++ Python |
O(k^2) |
O(1) |
Easy |
|
Array |
| 3653 |
XOR After Range Multiplication Queries I |
C++ Python |
O(qlogm + (q + n) * sqrt(n)) |
O(n * sqrt(n)) |
Medium |
|
Sqrt Decomposition, Difference Array, Fast Exponentiation, Simulation |
| 3655 |
XOR After Range Multiplication Queries II |
C++ Python |
O(qlogm + (q + n) * sqrt(n)) |
O(n * sqrt(n)) |
Hard |
|
Sqrt Decomposition, Difference Array, Fast Exponentiation |
| 3674 |
Minimum Operations to Equalize Array |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3683 |
Earliest Time to Finish One Task |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3687 |
Library Late Fee Calculator |
C++ Python |
O(n) |
O(1) |
Easy |
🔒 |
Array |
| 3688 |
Bitwise OR of Even Numbers in an Array |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3696 |
Maximum Distance Between Unequal Words in Array I |
C++ Python |
O(n * l) |
O(1) |
Easy |
🔒 |
Array |
| 3700 |
Number of ZigZag Arrays II |
C++ Python |
O((r - l)^3 * logn) |
O((r - l)^2) |
Hard |
|
Matrix Exponentiation |
| 3701 |
Compute Alternating Sum |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3706 |
Maximum Distance Between Unequal Words in Array II |
C++ Python |
O(n * l) |
O(1) |
Medium |
🔒 |
Array |
| 3707 |
Equal Score Substrings |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array, Prefix Sum |
| 3708 |
Longest Fibonacci Subarray |
C++ Python |
O(n) |
O(1) |
Medium |
|
Array |
| 3719 |
Longest Balanced Subarray I |
C++ Python |
O(nlogn) |
O(n) |
Medium |
|
Brute Force, Segment Tree, Binary Search, Prefix Sum |
| 3721 |
Longest Balanced Subarray II |
C++ Python |
O(nlogn) |
O(n) |
Hard |
|
Segment Tree, Binary Search, Prefix Sum |
| 3736 |
Minimum Moves to Equal Array Elements III |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3737 |
Count Subarrays With Majority Element I |
C++ Python |
O(n) |
O(n) |
Medium |
|
Freq Table, Prefix Sum |
| 3738 |
Longest Non-Decreasing Subarray After Replacing at Most One Element |
C++ Python |
O(n) |
O(n) |
Medium |
|
Array, Prefix Sum |
| 3739 |
Count Subarrays With Majority Element II |
C++ Python |
O(n) |
O(n) |
Hard |
|
Freq Table, Prefix Sum |
| 3751 |
Total Waviness of Numbers in Range I |
C++ Python |
O(nlogn) |
O(logn) |
Medium |
|
Brute Force |
| 3756 |
Concatenate Non-Zero Digits and Multiply by Sum II |
C++ Python |
O(n) |
O(n) |
Medium |
|
Prefix Sum |
| 3762 |
Minimum Operations to Equalize Subarrays |
C++ Python |
O((n + q) * logn) |
O(nlogn) |
Hard |
|
Prefix Sum, Coordinate Compression, Persistent Segment Tree, Binary Search |
| 3774 |
Absolute Difference Between Maximum and Minimum K Elements |
C++ Python |
O(n) |
O(1) |
Easy |
|
Sort, Quick Select |
| 3788 |
Maximum Score of a Split |
C++ Python |
O(n) |
O(1) |
Medium |
|
Prefix Sum |
| 3809 |
Best Reachable Tower |
C++ Python |
O(n) |
O(1) |
Medium |
|
Array |
| 3814 |
Maximum Capacity Within Budget |
C++ Python |
O(n + b) |
O(b) |
Medium |
|
Hash Table, Prefix Sum, Sort, Mono Stack, Binary Search |
| 3818 |
Minimum Prefix Removal to Make Array Strictly Increasing |
C++ Python |
O(n) |
O(1) |
Medium |
|
Array |
| 3819 |
Rotate Non Negative Elements |
C++ Python |
O(n) |
O(n) |
Medium |
|
Array |
| 3833 |
Count Dominant Indices |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3861 |
Minimum Capacity Box |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3862 |
Find the Smallest Balanced Index |
C++ Python |
O(n) |
O(1) |
Medium |
|
Prefix Sum |
| 3865 |
Reverse K Subarrays |
C++ Python |
O(n) |
O(1) |
Medium |
🔒 |
Array |
| 3880 |
Minimum Absolute Difference Between Two Values |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3886 |
Sum of Sortable Integers |
C++ Python |
O(nlog(logn)) |
O(n) |
Hard |
|
Prefix Sum, Number Theory |
| 3898 |
Find the Degree of Each Vertex |
C++ Python |
O(n * m) |
O(1) |
Easy |
|
Array |
| 3903 |
Smallest Stable Index I |
C++ Python |
O(n) |
O(n) |
Easy |
|
Prefix Sum |
| 3904 |
Smallest Stable Index II |
C++ Python |
O(n) |
O(n) |
Medium |
|
Prefix Sum |
| 3907 |
Count Smaller Elements With Opposite Parity |
C++ Python |
O(nlogn) |
O(n) |
Medium |
🔒 |
Sort, Coordinate Compression, BIT, Fenwick Tree |
| 3909 |
Compare Sums of Bitonic Parts |
C++ Python |
O(n) |
O(1) |
Medium |
|
Array |
| 3912 |
Valid Elements in an Array |
C++ Python |
O(n) |
O(n) |
Medium |
|
Prefix Sum |
| 3915 |
Maximum Sum of Alternating Subsequence With Distance at Least K |
C++ Python |
O(nlogn) |
O(n) |
Hard |
|
Sort, Coordinate Compression, BIT, Fenwick Tree, Sliding Window, DP |
| 3918 |
Sum of Primes Between Number and Its Reverse |
C++ Python |
precompute: O® runtime: O(1) |
O® |
Medium |
|
Number Theory, Linear Sieve of Eratosthenes, Prefix Sum |
| 3925 |
Concatenate Array With Reverse |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3933 |
Largest Local Values in a Matrix II |
C++ Python |
O(n * m * logn * logm) |
O(n * m * logn * logm) |
Medium |
|
RMQ, 2D Sparse Table |
| 3936 |
Minimum Swaps to Move Zeros to End |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3938 |
Maximum Path Intersection Sum in a Grid |
C++ Python |
O(n * m) |
O(1) |
Medium |
|
Array, Kadane's Algorithm |
| 3940 |
Limit Occurrences in Sorted Array |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array, Inplace |
| 3942 |
Minimum Operations to Sort a Permutation |
C++ Python |
O(n) |
O(1) |
Medium |
|
Array |
| 3943 |
Number of Pairs After Increment |
C++ Python |
O(n + m + q * sqrt(m * n)) |
O(n + m) |
Hard |
|
Freq Table, Sqrt Decomposition |
| 3951 |
Minimum Energy to Maintain Brightness |
C++ Python |
O(nlogn) |
O(1) |
Medium |
|
Sort, Line Sweep |
| 3951 |
Minimum Energy to Maintain Brightness |
C++ Python |
O(nlogn) |
O(1) |
Medium |
|
Sort, Line Sweep |
| 3963 |
Create Grid With Exactly One Path |
C++ Python |
O(m * n) |
O(1) |
Easy |
|
Array |
| 3978 |
Unique Middle Element |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 3979 |
Maximum Valid Pair Sum |
C++ Python |
O(n) |
O(n) |
Medium |
|
Prefix Sum |
| 3982 |
Sum of Integers with Maximum Digit Range |
C++ Python |
O(nlogr) |
O(1) |
Easy |
|
Array |
| 3985 |
Palindromic Subarray Sum |
C++ Python |
O(n) |
O(n) |
Hard |
|
Prefix Sum, Manacher's Algorithm |
| 3998 |
Transform Binary String Using Subsequence Sort |
C++ Python |
O(n * m) |
O(n) |
Hard |
|
Prefix Sum |
| 4006 |
Count Valid Prefixes |
C++ Python |
O(n) |
O(1) |
Easy |
|
Prefix Sum |
| 4010 |
Maximize Pair Strength Using GCD |
C++ Python |
O(n^2 * logr) |
O(1) |
Easy |
|
Brute Force, Sort, Pruning |
| 4011 |
Count Subarrays With Even Odd Ratio I |
C++ Python |
O(nlogn) |
O(n) |
Medium |
|
Prefix Sum, Sort, Coordinate Compression, BIT, Fenwick Tree, Brute Force |
| 4012 |
Count of Unfinished Tasks After Each Shift |
C++ Python |
O(n + mlogn) |
O(n) |
Medium |
|
Prefix Sum, Binary Search |
| 4013 |
Count Subarrays With Even Odd Ratio II |
C++ Python |
O(nlogn) |
O(n) |
Hard |
|
Prefix Sum, Sort, Coordinate Compression, BIT, Fenwick Tree |
| 4017 |
Peaks in Array II |
C++ Python |
O(nlogn + qlogn) |
O(n) |
Hard |
|
BIT, Fenwick Tree |
| 4020 |
Elevator Requests I |
C++ Python |
O(m) |
O(1) |
Easy |
|
Array |
| 4021 |
Minimum Operations to Make a Rotated Palindrome I |
C++ Python |
O(nlogn) |
O(n) |
Medium |
|
Brute Force, NTT |
| 4024 |
Nearest Available Drone |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 4028 |
Minimum Operations to Make a Rotated Palindrome II |
C++ Python |
O(nlogn) |
O(n) |
Hard |
🔒 |
NTT |
| 4051 |
Count Subarrays with Distant Sums |
C++ Python |
O(nlogn) |
O(n) |
Hard |
|
Prefix Sum, Sorted List, Ordered Set, BIT, Fenwick Tree |
| 4052 |
Cyclically Shift Rows and Columns |
C++ Python |
O(n^2) |
O(1) |
Easy |
|
Array, Inplace |
| 4056 |
Number of Intersecting Interval Pairs I |
C++ Python |
O(nlogn) |
O(n) |
Easy |
|
Brute Force, Sort, Line Sweep |
| 4057 |
Number of Intersecting Interval Pairs II |
C++ Python |
O(nlogn) |
O(n) |
Medium |
|
Sort, Line Sweep |
| 4058 |
Maximum Pulse Value After One Subarray Rotation |
C++ Python |
O(n) |
O(1) |
Medium |
|
Prefix Sum, Hash Table |
| 4062 |
Transform Array Using Pair Operations |
C++ Python |
O(n) |
O(1) |
Medium |
|
Array |
| 4063 |
Longest Subarray Divisible by K with At Most One Negation I |
C++ Python |
O(n + k^2) |
O(k) |
Medium |
|
Prefix Sum, Hash Table, Brute Force |
| 4064 |
Longest Subarray Divisible by K with At Most One Negation II |
C++ Python |
O(n + k^2) |
O(k) |
Hard |
|
Prefix Sum, Hash Table |
| 4073 |
Count Good Strings |
C++ Python |
O(logr) |
O(1) |
Hard |
|
Matrix Fast Exponentiation |
| 4083 |
Minimum Deletions to Make Array Sharp |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 4088 |
Difference Between Peaks and Valleys |
C++ Python |
O(n) |
O(1) |
Easy |
|
Array |
| 4097 |
Minimum Value of Merged Integers |
C++ Python |
O(nlogr) |
O(1) |
Easy |
|
Array |
| 4099 |
Minimum Operations to Sort With Locked Indices |
C++ Python |
O(nlogn) |
O(n) |
Medium |
|
Sorted List, Ordered Set, BIT, Fenwick Tree |
评论