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 140 solutions matching Hard, filtered from 1,055.
- 1645. Find a Value of a Mysterious Function Closest to Target Hard Languages: Python Accepted runtime 514ms
- 1691. Minimum Number of Days to Disconnect Island Hard Languages: C++ Accepted runtime 84ms
- 1744. Number of Ways to Form a Target String Given a Dictionary Hard Languages: C++ Accepted runtime 36ms
- 1794. Minimize Deviation in Array Hard Languages: Python Accepted runtime 1038ms
- 1825. Find Minimum Time to Finish All Jobs Hard Languages: C++ Accepted runtime 0ms
- 1836. Count Ways to Make Array With Product Hard Languages: Python Accepted runtime 191ms
- 1851. Maximum Number of Events That Can Be Attended II Hard Languages: C++ Accepted runtime 212ms
- 1861. Building Boxes Hard Languages: C++ Accepted runtime 0ms
- 1881. Closest Subsequence Sum Hard Languages: Python Accepted runtime 804ms
- 1887. Minimum Degree of a Connected Trio in a Graph Hard Languages: C++ Accepted runtime 1182ms
- 1963. Find XOR Sum of All Pairs Bitwise AND Hard Languages: Python Accepted runtime 15ms
- 2008. Minimum Cost to Change the Final Value of Expression Hard Languages: C++ Accepted runtime 35ms
- 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
- 2176. Parallel Courses III Hard Languages: C++ Accepted runtime 60ms
- 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
- 2479. Meeting Rooms III Hard Languages: C++ Accepted runtime 69ms
- 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
- 2808. Painting the Walls Hard Languages: C++ Accepted runtime 19ms
- 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
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.