LeetCode solutions — page 2
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 51–100 of 121 solutions matching Hard + Python, filtered from 1,055.
- 2096. Find the Longest Valid Obstacle Course at Each Position Hard Languages: Python Accepted runtime 138ms
- 2101. Last Day Where You Can Still Cross Hard Languages: Python Accepted runtime 1860ms
- 2201. Valid Arrangement of Pairs Hard Languages: Python Accepted runtime 549ms
- 2213. Find All People With Secret Hard Languages: Python Accepted runtime 412ms
- 2229. Maximum Fruits Harvested After at Most K Steps Hard Languages: Python Accepted runtime 109ms
- 2234. Minimum Operations to Make the Array K-Increasing Hard Languages: Python Accepted runtime 174ms
- 2251. Number of Ways to Divide a Long Corridor Hard Languages: Python Accepted runtime 223ms
- 2263. Maximum Running Time of N Computers Hard Languages: Python Accepted runtime 1420ms
- 2334. Number of Flowers in Full Bloom Hard Languages: Python Accepted runtime 97ms
- 2375. Minimum Obstacle Removal to Reach Corner Hard Languages: Python Accepted runtime 808ms
- 2393. Match Substring After Replacement Hard Languages: Python Accepted runtime 2351ms
- 2394. Count Subarrays With Score Less Than K Hard Languages: Python Accepted runtime 103ms
- 2450. Minimum Replacements to Sort the Array Hard Languages: Python Accepted runtime 29ms
- 2457. Count Special Integers Hard Languages: Python Accepted runtime 174ms
- 2494. Sum of Prefix Scores of Strings Hard Languages: Python Accepted runtime 1222ms
- 2505. Number of Good Paths Hard Languages: Python Accepted runtime 403ms
- 2526. Longest Increasing Subsequence II Hard Languages: Python Accepted runtime 1224ms
- 2527. Count Subarrays With Fixed Bounds Hard Languages: Python Accepted runtime 176ms
- 2538. Minimum Cost to Make Array Equal Hard Languages: Python Accepted runtime 77ms
- 2539. Minimum Number of Operations to Make Arrays Similar Hard Languages: Python Accepted runtime 136ms
- 2569. Number of Beautiful Partitions Hard Languages: Python Accepted runtime 1187ms
- 2574. Count Subarrays With Median K Hard Languages: Python Accepted runtime 31ms
- 2601. Number of Great Partitions Hard Languages: Python Accepted runtime 65ms
- 2605. Count Anagrams Hard Languages: Python Accepted runtime 692ms
- 2618. Maximize the Minimum Powered City Hard Languages: Python Accepted runtime 2737ms
- 2642. Time to Cross a Bridge Hard Languages: Python Accepted runtime 219ms
- 2647. Split the Array to Make Coprime Products Hard Languages: Python Accepted runtime 4508ms
- 2648. Number of Ways to Earn Points Hard Languages: Python Accepted runtime 714ms
- 2652. Count Number of Possible Root Nodes Hard Languages: Python Accepted runtime 400ms
- 2657. Minimum Time to Complete All Tasks Hard Languages: Python Accepted runtime 589ms
- 2681. Put Marbles in Bags Hard Languages: Python Accepted runtime 135ms
- 2689. Rearranging Fruits Hard Languages: Python Accepted runtime 117ms
- 2757. Count of Integers Hard Languages: Python Accepted runtime 294ms
- 2818. Maximum Strictly Increasing Cells in a Matrix Hard Languages: Python Accepted runtime 723ms
- 2849. Sum of Imbalance Numbers of All Subarrays Hard Languages: Python Accepted runtime 249ms
- 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
- 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
Page 2 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.