LeetCode solutions — page 5
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 201–250 of 307 solutions matching Medium + Python, filtered from 1,055.
- 2954. Maximum Sum of Almost Unique Subarray Medium Languages: Python Accepted runtime 103ms
- 3033. Apply Operations to Make Two Strings Equal Medium Languages: Python Accepted runtime 3ms
- 3080. Split Array Into Maximum Number of Subarrays Medium Languages: Python Accepted runtime 49ms
- 3094. Minimum Number of Operations to Make Array Empty Medium Languages: Python Accepted runtime 37ms
- 3166. Minimum Number of Groups to Create a Valid Assignment Medium Languages: Python Accepted runtime 63ms
- 3171. Minimum Equal Sum of Two Arrays After Replacing Zeros Medium Languages: Python Accepted runtime 893ms
- 3189. Find Champion II Medium Languages: Python Accepted runtime 7ms
- 3190. Minimum Operations to Maximize Last Elements in Arrays Medium Languages: Python Accepted runtime 7ms
- 3209. Minimum Number of Coins for Fruits Medium Languages: Python Accepted runtime 407ms
- 3210. Count Beautiful Substrings I Medium Languages: Python Accepted runtime 839ms
- 3213. Count Subarrays Where Max Element Appears at Least K Times Medium Languages: Python Accepted runtime 90ms
- 3214. Maximize Area of Square Hole in Grid Medium Languages: Python Accepted runtime 3ms
- 3219. Make Lexicographically Smallest Array by Swapping Elements Medium Languages: Python Accepted runtime 334ms
- 3225. Length of Longest Subarray With at Most K Frequency Medium Languages: Python Accepted runtime 306ms
- 3230. Remove Adjacent Almost-Equal Characters Medium Languages: Python Accepted runtime 3ms
- 3235. Minimum Cost to Convert String I Medium Languages: Python Accepted runtime 755ms
- 3249. Minimum Number of Operations to Make Array XOR Equal to K Medium Languages: Python Accepted runtime 598ms
- 3262. Find Polygon With the Largest Perimeter Medium Languages: Python Accepted runtime 68ms
- 3272. Find the Grid of Region Average Medium Languages: Python Accepted runtime 3469ms
- 3276. Minimum Number of Pushes to Type Word II Medium Languages: Python Accepted runtime 109ms
- 3291. Find if Array Can Be Sorted Medium Languages: Python Accepted runtime 15ms
- 3299. Find the Maximum Number of Elements in Subset Medium Languages: Python Accepted runtime 122ms
- 3306. Mark Elements on Array by Performing Queries Medium Languages: Python Accepted runtime 1934ms
- 3326. Count Pairs of Connectable Servers in a Weighted Tree Network Medium Languages: Python Accepted runtime 1575ms
- 3328. Apply Operations to Make Sum of Array Greater Than or Equal to k Medium Languages: Python Accepted runtime 3ms
- 3351. Maximize Happiness of Selected Children Medium Languages: Python Accepted runtime 853ms
- 3360. Minimum Deletions to Make String K-Special Medium Languages: Python Accepted runtime 56ms
- 3373. Maximum Prime Difference Medium Languages: Python Accepted runtime 883ms
- 3380. Shortest Subarray With OR at Least K II Medium Languages: Python Accepted runtime 1824ms
- 3384. Minimum Number of Operations to Make Word K-Periodic Medium Languages: Python Accepted runtime 59ms
- 3389. Minimum Time to Visit Disappearing Nodes Medium Languages: Python Accepted runtime 394ms
- 3390. Minimum Rectangles to Cover Points Medium Languages: Python Accepted runtime 28ms
- 3394. Minimum Array End Medium Languages: Python Accepted runtime 0ms
- 3404. Minimum Number of Operations to Satisfy Conditions Medium Languages: Python Accepted runtime 171ms
- 3406. Find All Possible Stable Binary Arrays I Medium Languages: Python Accepted runtime 7382ms
- 3416. Sum of Digit Differences of All Pairs Medium Languages: Python Accepted runtime 379ms
- 3418. Count Pairs That Form a Complete Day II Medium Languages: Python Accepted runtime 1073ms
- 3420. Find Occurrences of an Element in an Array Medium Languages: Python Accepted runtime 44ms
- 3427. Special Array II Medium Languages: Python Accepted runtime 35ms
- 3430. Count Days Without Meetings Medium Languages: Python Accepted runtime 191ms
- 3434. Find the Number of Distinct Colors Among the Balls Medium Languages: Python Accepted runtime 59ms
- 3437. Maximum Total Damage With Spell Casting Medium Languages: Python Accepted runtime 1121ms
- 3444. Find the Number of Good Pairs II Medium Languages: Python Accepted runtime 7485ms
- 3455. Minimum Length of String After Operations Medium Languages: Python Accepted runtime 147ms
- 3461. Find the Minimum Area to Cover All Ones I Medium Languages: Python Accepted runtime 2999ms
- 3479. Count the Number of Substrings With Dominant Ones Medium Languages: Python Accepted runtime 19769ms
- 3483. Alternating Groups II Medium Languages: Python Accepted runtime 737ms
- 3491. Find the Maximum Length of Valid Subsequence II Medium Languages: Python Accepted runtime 1247ms
- 3492. Count Submatrices With Equal Frequency of X and Y Medium Languages: Python Accepted runtime 924ms
- 3495. K-th Nearest Obstacle Queries Medium Languages: Python Accepted runtime 194ms
Page 5 of 7
These are practice solutions, not lessons. If you came here to learn how any of it works, the explanations live in the lessons.