LeetCode solutions — page 6
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 251–300 of 346 solutions matching Medium, filtered from 1,055.
- 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
- 3507. Find the Count of Numbers Which Are Not Special Medium Languages: Python Accepted runtime 227ms
- 3510. Maximize the Total Height of Unique Towers Medium Languages: Python Accepted runtime 219ms
- 3530. Odd and Even Transactions Medium Languages: SQL Accepted runtime 257ms
- 3534. Count Almost Equal Pairs I Medium Languages: Python Accepted runtime 3161ms
- 3540. Hash Divided String Medium Languages: Python Accepted runtime 19ms
- 3559. Minimum Number of Valid Strings to Form Target I Medium Languages: Python Accepted runtime 11060ms
- 3566. Find the Sequence of Strings Appeared on the Screen Medium Languages: Python Accepted runtime 21ms
- 3569. Count of Substrings Containing Every Vowel and K Consonants II Medium Languages: Python Accepted runtime 1479ms
- 3573. Count Substrings That Can Be Rearranged to Contain a String I Medium Languages: Python Accepted runtime 291ms
- 3587. Maximum Points Tourist Can Earn Medium Languages: Python Accepted runtime 7578ms
- 3593. Find the Maximum Factor Score of Array Medium Languages: Python Accepted runtime 45ms
- 3611. Construct the Minimum Bitwise Array II Medium Languages: Python Accepted runtime 0ms
- 3620. Maximum Number of Distinct Elements After Operations Medium Languages: Python Accepted runtime 751ms
- 3622. Maximum Frequency of an Element After Performing Operations I Medium Languages: Python Accepted runtime 2046ms
- 3627. Find Minimum Time to Reach Last Room I Medium Languages: Python Accepted runtime 135ms
- 3628. Find Minimum Time to Reach Last Room II Medium Languages: Python Accepted runtime 2427ms
- 3629. Total Characters in String After Transformations I Medium Languages: Python Accepted runtime 6071ms
- 3633. Maximize the Number of Target Nodes After Connecting Trees I Medium Languages: Python Accepted runtime 2091ms
- 3639. Zero Array Transformation I Medium Languages: Python Accepted runtime 63ms
- 3643. Zero Array Transformation II Medium Languages: Python Accepted runtime 507ms
Page 6 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.