LeetCode solutions — page 3
Every LeetCode problem I have solved, with the accepted code in each language I solved it in. The problem statements stay on LeetCode where they belong — what is here is the solution, the runtime it was accepted at, and a link to the repository it came from.
1,055 solutions
Showing 101–140 of 140 solutions matching Hard, filtered from 1,055.
- 2879. Minimum Changes to Make K Semi-palindromes Hard Languages: Python Accepted runtime 7085ms
- 2919. Maximum Number of Groups With Increasing Length Hard Languages: Python Accepted runtime 158ms
- 2952. Minimum Time to Make Array Sum At Most x Hard Languages: Python Accepted runtime 719ms
- 3032. Maximize Value of Function in a Ball Passing Game Hard Languages: Python Accepted runtime 6328ms
- 3057. Count K-Subsequences of a String With Maximum Beauty Hard Languages: C++ Accepted runtime 2ms
- 3079. Minimum Edge Weight Equilibrium Queries in a Tree Hard Languages: Python Accepted runtime 2189ms
- 3139. Subarrays Distinct Element Sum of Squares II Hard Languages: Python Accepted runtime 6676ms
- 3181. Find Building Where Alice and Bob Can Meet Hard Languages: Python Accepted runtime 526ms
- 3196. Apply Operations to Maximize Frequency Score Hard Languages: Python Accepted runtime 835ms
- 3277. Find the Number of Ways to Place People II Hard Languages: Python Accepted runtime 2418ms
- 3303. Find Beautiful Indices in the Given Array II Hard Languages: Python Accepted runtime 1921ms
- 3305. Count Prefix and Suffix Pairs II Hard Languages: Python Accepted runtime 1972ms
- 3327. Minimum Moves to Pick K Ones Hard Languages: Python Accepted runtime 107ms
- 3348. Minimum Cost Walk in Weighted Graph Hard Languages: Python Accepted runtime 181ms
- 3350. Distribute Elements Into Two Arrays II Hard Languages: Python Accepted runtime 993ms
- 3439. Find Minimum Diameter After Merging Two Trees Hard Languages: Python Accepted runtime 525ms
- 3454. Minimum Operations to Make Array Equal to Target Hard Languages: Python Accepted runtime 67ms
- 3459. Find the Minimum Area to Cover All Ones II Hard Languages: Python Accepted runtime 6583ms
- 3531. Minimum Amount of Damage Dealt to Bob Hard Languages: Python Accepted runtime 219ms
- 3544. Count Almost Equal Pairs II Hard Languages: Python Accepted runtime 5414ms
- 3546. Count Substrings That Satisfy K-Constraint II Hard Languages: Python Accepted runtime 591ms
- 3548. Find the Count of Good Integers Hard Languages: Python Accepted runtime 814ms
- 3552. Find the Largest Palindrome Divisible by K Hard Languages: Python Accepted runtime 99ms
- 3556. Final Array State After K Multiplication Operations II Hard Languages: Python Accepted runtime 368ms
- 3563. Select Cells in Grid With Maximum Score Hard Languages: Python Accepted runtime 344ms
- 3572. Count Substrings That Can Be Rearranged to Contain a String II Hard Languages: Python Accepted runtime 3210ms
- 3637. Count Number of Balanced Permutations Hard Languages: Python Accepted runtime 2186ms
- 3645. Maximize the Number of Target Nodes After Connecting Trees II Hard Languages: Python Accepted runtime 493ms
- 3646. Sum of Good Subsequences Hard Languages: Python Accepted runtime 441ms
- 3648. Find the Maximum Number of Fruits Collected Hard Languages: Python Accepted runtime 2528ms
- 3680. Count Connected Components in LCM Graph Hard Languages: Python Accepted runtime 9120ms
- 3711. First Letter Capitalization II Hard Languages: SQL Accepted runtime 364ms
- 3774. Check If Digits Are Equal in String After Operations II Hard Languages: Python Accepted runtime 5383ms
- 3792. Find Invalid IP Addresses Hard Languages: SQL Accepted runtime 279ms
- 3801. Count Beautiful Numbers Hard Languages: Python Accepted runtime 976ms
- 3891. Find Category Recommendation Pairs Hard Languages: SQL Accepted runtime 675ms
- 4064. Minimum Deletions to Make Alternating Substring Hard Languages: Python Accepted runtime 1441ms
- 4072. Total Sum of Interaction Cost in Tree Groups Hard Languages: Python Accepted runtime 795ms
- 4075. Count Subarrays With Majority Element II Hard Languages: Python Accepted runtime 657ms
- 4095. Number of Balanced Integers in a Range Hard Languages: Python Accepted runtime 5698ms
Page 3 of 3
These are practice solutions, not lessons. If you came here to learn how any of it works, the explanations live in the lessons.