LeetCode solutions — page 8
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 351–400 of 1,055 solutions.
- 1881. Closest Subsequence Sum Hard Languages: Python Accepted runtime 804ms
- 1882. The Number of Employees Which Report to Each Employee Easy Languages: SQL Accepted runtime 1497ms
- 1884. Minimum Changes To Make Alternating Binary String Easy Languages: Python Accepted runtime 11ms
- 1887. Minimum Degree of a Connected Trio in a Graph Hard Languages: C++ Accepted runtime 1182ms
- 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
- 1892. Find Total Time Spent by Each Employee Easy Languages: SQL Accepted runtime 477ms
- 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
- 1908. Recyclable and Low Fat Products Easy Languages: SQL Accepted runtime 497ms
- 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
- 1942. Primary Department for Each Employee Easy Languages: SQL Accepted runtime 513ms
- 1944. Truncate Sentence Easy Languages: Python Accepted runtime 0ms
- 1948. Rearrange Products Table Easy Languages: SQL Accepted runtime 478ms
- 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
- 2008. Minimum Cost to Change the Final Value of Expression Hard Languages: C++ Accepted runtime 35ms
- 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
- 2024. Calculate Special Bonus Easy Languages: SQL Accepted runtime 617ms
- 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
- 2037. Count Square Sum Triples Easy Languages: Python Accepted runtime 110ms
- 2041. The Latest Login in 2020 Easy Languages: SQL Accepted runtime 541ms
- 2042. Maximum Product Difference Between Two Pairs Easy Languages: Python Accepted runtime 140ms
- 2048. Build Array from Permutation Easy Languages: Python Accepted runtime 0ms
- 2053. Check if All Characters Have Equal Number of Occurrences Easy Languages: Python Accepted runtime 0ms
- 2058. Concatenation of Array Easy Languages: Python Accepted runtime 0ms
- 2066. Add Minimum Number of Rungs Medium Languages: Python Accepted runtime 8ms
Page 8 of 22
These are practice solutions, not lessons. If you came here to learn how any of it works, the explanations live in the lessons.