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 867 solutions matching Python, filtered from 1,055.
- 1806. Count of Matches in Tournament Easy Languages: Python Accepted runtime 42ms
- 1812. Reformat Phone Number Easy Languages: Python Accepted runtime 0ms
- 1817. Calculate Money in Leetcode Bank Easy Languages: Python Accepted runtime 0ms
- 1823. Determine if String Halves Are Alike Easy Languages: Python Accepted runtime 3ms
- 1829. Maximum Units on a Truck Easy Languages: Python Accepted runtime 5ms
- 1833. Find the Highest Altitude Easy Languages: Python Accepted runtime 0ms
- 1836. Count Ways to Make Array With Product Hard Languages: Python Accepted runtime 191ms
- 1839. Decode XORed Array Easy Languages: Python Accepted runtime 0ms
- 1843. Number Of Rectangles That Can Form The Largest Square Easy Languages: Python Accepted runtime 160ms
- 1844. Maximum Number of Balls in a Box Easy Languages: Python Accepted runtime 204ms
- 1848. Sum of Unique Elements Easy Languages: Python Accepted runtime 0ms
- 1850. Minimum Length of String After Deleting Similar Ends Medium Languages: Python Accepted runtime 27ms
- 1858. Latest Time by Replacing Hidden Digits Easy Languages: Python Accepted runtime 0ms
- 1873. Longest Nice Substring Easy Languages: Python Accepted runtime 0ms
- 1878. Check if Array Is Sorted and Rotated Easy Languages: Python Accepted runtime 0ms
- 1881. Closest Subsequence Sum Hard Languages: Python Accepted runtime 804ms
- 1884. Minimum Changes To Make Alternating Binary String Easy Languages: Python Accepted runtime 11ms
- 1888. Find Nearest Point That Has the Same X or Y Coordinate Easy Languages: Python Accepted runtime 11ms
- 1889. Check if Number is a Sum of Powers of Three Medium Languages: Python Accepted runtime 0ms
- 1894. Merge Strings Alternately Easy Languages: Python Accepted runtime 37ms
- 1899. Count Items Matching a Rule Easy Languages: Python Accepted runtime 0ms
- 1904. Second Largest Digit in a String Easy Languages: Python Accepted runtime 4ms
- 1910. Check if Binary String Has at Most One Segment of Ones Easy Languages: Python Accepted runtime 0ms
- 1915. Check if One String Swap Can Make Strings Equal Easy Languages: Python Accepted runtime 0ms
- 1916. Find Center of Star Graph Easy Languages: Python Accepted runtime 0ms
- 1920. Determine Color of a Chessboard Square Easy Languages: Python Accepted runtime 0ms
- 1927. Maximum Ascending Subarray Sum Easy Languages: Python Accepted runtime 0ms
- 1933. Number of Different Integers in a String Easy Languages: Python Accepted runtime 0ms
- 1938. Minimum Operations to Make the Array Increasing Easy Languages: Python Accepted runtime 99ms
- 1940. Maximum XOR for Each Query Medium Languages: Python Accepted runtime 48ms
- 1944. Truncate Sentence Easy Languages: Python Accepted runtime 0ms
- 1950. Sign of the Product of an Array Easy Languages: Python Accepted runtime 2ms
- 1954. Replace All Digits with Characters Easy Languages: Python Accepted runtime 0ms
- 1960. Check if the Sentence Is Pangram Easy Languages: Python Accepted runtime 0ms
- 1963. Find XOR Sum of All Pairs Bitwise AND Hard Languages: Python Accepted runtime 15ms
- 1965. Sum of Digits in Base K Easy Languages: Python Accepted runtime 0ms
- 1970. Sorting the Sentence Easy Languages: Python Accepted runtime 30ms
- 1972. Rotating the Box Medium Languages: Python Accepted runtime 135ms
- 1975. Minimum Distance to the Target Element Easy Languages: Python Accepted runtime 0ms
- 1983. Maximum Population Year Easy Languages: Python Accepted runtime 3ms
- 1987. Substrings of Size Three with Distinct Characters Easy Languages: Python Accepted runtime 3ms
- 1993. Sum of All Subset XOR Totals Easy Languages: Python Accepted runtime 0ms
- 1999. Longer Contiguous Segments of Ones than Zeros Easy Languages: Python Accepted runtime 3ms
- 2005. Check if All the Integers in a Range Are Covered Easy Languages: Python Accepted runtime 0ms
- 2010. Check if Word Equals Summation of Two Words Easy Languages: Python Accepted runtime 0ms
- 2015. Determine Whether Matrix Can Be Obtained By Rotation Easy Languages: Python Accepted runtime 0ms
- 2016. Reduction Operations to Make the Array Elements Equal Medium Languages: Python Accepted runtime 108ms
- 2020. Remove One Element to Make the Array Strictly Increasing Easy Languages: Python Accepted runtime 191ms
- 2025. Redistribute Characters to Make All Strings Equal Easy Languages: Python Accepted runtime 31ms
- 2032. Largest Odd Number in String Easy Languages: Python Accepted runtime 10ms
Page 6 of 18
These are practice solutions, not lessons. If you came here to learn how any of it works, the explanations live in the lessons.