• Stars
    star
    276
  • Rank 149,319 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 6 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

LeetCode Problems' Solutions

LeetCode

LeetCode Problems' Solutions [力扣话题分类]

Go codecov Go Report Card GitHub contributors license FOSSA Status Join the chat

[1-50] [51-100] [101-150] [151-200] [201-250] [251-300]
[301-350] [351-400] [401-450] [451-500] [501-550] [551-600]
[601-650] [651-700] [701-750] [751-800] [801-850] [851-900]
[901-950] [951-1000] [1001-1050] [1051-1100] [1101-1150] [1151-1200]
[1201-1250] [1251-1300] [1301-1350] [1351-1400] [1401-1450] [1451-1500]
[1501-1550] [1551-1600] [1601-1650] [1651-1700] [1701-1750] [1751-1800]
[1801-1850] [1851-1900] [1901-1950] [1951-2000] [2001-2050] [2051-2100]
[2101-2150] [2151-2200] [2201-2250] [2251-2300] [2301-2350] [2351-2400]
# Title Solution Difficulty
2173 Longest Winning Streak 🔒 MySQL Hard
2172 Maximum AND Sum of Array Go Hard
2171 Removing Minimum Number of Magic Beans Go Medium
2170 Minimum Operations to Make the Array Alternating Go Medium
2169 Count Operations to Obtain Zero Go Easy
2168 Unique Substrings With Equal Digit Frequency 🔒 Go Medium
2167 Minimum Time to Remove All Cars Containing Illegal Goods Go Hard
2166 Design Bitset Go Medium
2165 Smallest Value of the Rearranged Number Go Medium
2164 Sort Even and Odd Indices Independently Go Easy
2163 Minimum Difference in Sums After Removal of Elements Go Hard
2162 Minimum Cost to Set Cooking Time Go Medium
2161 Partition Array According to Given Pivot Go Medium
2160 Minimum Sum of Four Digit Number After Splitting Digits Go Easy
2159 Order Two Columns Independently 🔒 MySQL Medium
2158 Amount of New Area Painted Each Day 🔒 Go Hard
2157 Groups of Strings Go Hard
2156 Find Substring With Given Hash Value Go Hard
2155 All Divisions With the Highest Score of a Binary Array Go Medium
2154 Keep Multiplying Found Values by Two Go Easy
2153 The Number of Passengers in Each Bus II 🔒 MySQL Hard
2152 Minimum Number of Lines to Cover Points 🔒 Go Medium
2151 Maximum Good People Based on Statements Go Hard
2150 Find All Lonely Numbers in the Array Go Medium
2149 Rearrange Array Elements by Sign Go Medium
2148 Count Elements With Strictly Smaller and Greater Elements Go Easy
2147 Number of Ways to Divide a Long Corridor Go Hard
2146 K Highest Ranked Items Within a Price Range Go Medium
2145 Count the Hidden Sequences Go Medium
2144 Minimum Cost of Buying Candies With Discount Go Easy
2143 Choose Numbers From Two Arrays in Range 🔒 Go Hard
2142 The Number of Passengers in Each Bus I 🔒 MySQL Medium
2141 Maximum Running Time of N Computers Go Hard
2140 Solving Questions With Brainpower Go Medium
2139 Minimum Moves to Reach Target Score Go Medium
2138 Divide a String Into Groups of Size k Go Easy
2137 Pour Water Between Buckets to Make Water Levels Equal 🔒 Go Medium
2136 Earliest Possible Day of Full Bloom Go Hard
2135 Count Words Obtained After Adding a Letter Go Medium
2134 Minimum Swaps to Group All 1's Together II Go Medium
2133 Check if Every Row and Column Contains All Numbers Go Easy
2132 Stamping the Grid Go Hard
2131 Longest Palindrome by Concatenating Two Letter Words Go Medium
2130 Maximum Twin Sum of a Linked List Go Medium
2129 Capitalize the Title Go Easy
2128 Remove All Ones With Row and Column Flips 🔒 Go Medium
2127 Maximum Employees to Be Invited to a Meeting Go Hard
2126 Destroying Asteroids Go Medium
2125 Number of Laser Beams in a Bank Go Medium
2124 Check if All A's Appears Before All B's Go Easy
2123 Minimum Operations to Remove Adjacent Ones in Matrix 🔒 Go Hard
2122 Recover the Original Array Go Hard
2121 Intervals Between Identical Elements Go Medium
2120 Execution of All Suffix Instructions Staying in a Grid Go Medium
2119 A Number After a Double Reversal Go Easy
2118 Build the Equation 🔒 MySQL Hard
2117 Abbreviating the Product of a Range Go Hard
2116 Check if a Parentheses String Can Be Valid Go Medium
2115 Find All Possible Recipes from Given Supplies Go Medium
2114 Maximum Number of Words Found in Sentences Go Easy
2113 Elements in Array After Removing and Replacing Elements 🔒 Go Medium
2112 The Airport With the Most Traffic 🔒 MySQL Medium
2111 Minimum Operations to Make the Array K-Increasing Go Hard
2110 Number of Smooth Descent Periods of a Stock Go Medium
2109 Adding Spaces to a String Go Medium
2108 Find First Palindromic String in the Array Go Easy
2107 Number of Unique Flavors After Sharing K Candies 🔒 Go Medium
2106 Maximum Fruits Harvested After at Most K Steps Go Hard
2105 Watering Plants II Go Medium
2104 Sum of Subarray Ranges Go Medium
2103 Rings and Rods Go Easy
2102 Sequentially Ordinal Rank Tracker Go Hard
2101 Detonate the Maximum Bombs Go Medium
2100 Find Good Days to Rob the Bank Go Medium
2099 Find Subsequence of Length K With the Largest Sum Go Easy
2098 Subsequence of Size K With the Largest Even Sum 🔒 Go Medium
2097 Valid Arrangement of Pairs Go Hard
2096 Step-By-Step Directions From a Binary Tree Node to Another Go Medium
2095 Delete the Middle Node of a Linked List Go Medium
2094 Finding 3-Digit Even Numbers Go Easy
2093 Minimum Cost to Reach City With Discounts 🔒 Go Medium
2092 Find All People With Secret Go Hard
2091 Removing Minimum and Maximum From Array Go Medium
2090 K Radius Subarray Averages Go Medium
2089 Find Target Indices After Sorting Array Go Easy
2088 Count Fertile Pyramids in a Land Go Hard
2087 Minimum Cost Homecoming of a Robot in a Grid Go Medium
2086 Minimum Number of Buckets Required to Collect Rainwater from Houses Go Medium
2085 Count Common Words With One Occurrence Go Easy
2084 Drop Type 1 Orders for Customers With Type 0 Orders 🔒 MySQL Medium
2083 Substrings That Begin and End With the Same Letter 🔒 Go Medium
2082 The Number of Rich Customers 🔒 MySQL Easy
2081 Sum of k-Mirror Numbers Go Hard
2080 Range Frequency Queries Go Medium
2079 Watering Plants Go Medium
2078 Two Furthest Houses With Different Colors Go Easy
2077 Paths in Maze That Lead to Same Room 🔒 Go Medium
2076 Process Restricted Friend Requests Go Hard
2075 Decode the Slanted Ciphertext Go Medium
2074 Reverse Nodes in Even Length Groups Go Medium
2073 Time Needed to Buy Tickets Go Easy
2072 The Winner University 🔒 MySQL Easy
2071 Maximum Number of Tasks You Can Assign Go Hard
2070 Most Beautiful Item for Each Query Go Medium
2069 Walking Robot Simulation II Go Medium
2068 Check Whether Two Strings are Almost Equivalent Go Easy
2067 Number of Equal Count Substrings 🔒 Go Medium
2066 Account Balance 🔒 MySQL Medium
2065 Maximum Path Quality of a Graph Go Hard
2064 Minimized Maximum of Products Distributed to Any Store Go Medium
2063 Vowels of All Substrings Go Medium
2062 Count Vowel Substrings of a String Go Easy
2061 Number of Spaces Cleaning Robot Cleaned 🔒 Go Medium
2060 Check if an Original String Exists Given Two Encoded Strings Go Hard
2059 Minimum Operations to Convert Number Go Medium
2058 Find the Minimum and Maximum Number of Nodes Between Critical Points Go Medium
2057 Smallest Index With Equal Value Go Easy
2056 Number of Valid Move Combinations On Chessboard Go Hard
2055 Plates Between Candles Go Medium
2054 Two Best Non-Overlapping Events Go Medium
2053 Kth Distinct String in an Array Go Easy
2052 Minimum Cost to Separate Sentence Into Rows 🔒 Go Medium
2051 The Category of Each Member in the Store 🔒 MySQL Medium
2050 Parallel Courses III Go Hard
2049 Count Nodes With the Highest Score Go Medium
2048 Next Greater Numerically Balanced Number Go Medium
2047 Number of Valid Words in a Sentence Go Easy
2046 Sort Linked List Already Sorted Using Absolute Values 🔒 Go Medium
2045 Second Minimum Time to Reach Destination Go Hard
2044 Count Number of Maximum Bitwise-OR Subsets Go Medium
2043 Simple Bank System Go Medium
2042 Check if Numbers Are Ascending in a Sentence Go Easy
2041 Accepted Candidates From the Interviews 🔒 MySQL Medium
2040 Kth Smallest Product of Two Sorted Arrays Go Hard
2039 The Time When the Network Becomes Idle Go Medium
2038 Remove Colored Pieces if Both Neighbors are the Same Color Go Medium
2037 Minimum Number of Moves to Seat Everyone Go Easy
2036 Maximum Alternating Subarray Sum 🔒 Go Medium
2035 Partition Array Into Two Arrays to Minimize Sum Difference Go Hard
2034 Stock Price Fluctuation Go Medium
2033 Minimum Operations to Make a Uni-Value Grid Go Medium
2032 Two Out of Three Go Easy
2031 Count Subarrays With More Ones Than Zeros 🔒 Go Medium
2030 Smallest K-Length Subsequence With Occurrences of a Letter Go Hard
2029 Stone Game IX Go Medium
2028 Find Missing Observations Go Medium
2027 Minimum Moves to Convert String Go Easy
2026 Low-Quality Problems 🔒 MySQL Easy
2025 Maximum Number of Ways to Partition an Array Go Hard
2024 Maximize the Confusion of an Exam Go Medium
2023 Number of Pairs of Strings With Concatenation Equal to Target Go Medium
2022 Convert 1D Array Into 2D Array Go Easy
2021 Brightest Position on Street 🔒 Go Medium
2020 Number of Accounts That Did Not Stream 🔒 MySQL Medium
2019 The Score of Students Solving Math Expression Go Hard
2018 Check if Word Can Be Placed In Crossword Go Medium
2017 Grid Game Go Medium
2016 Maximum Difference Between Increasing Elements Go Easy
2015 Average Height of Buildings in Each Segment 🔒 Go Medium
2014 Longest Subsequence Repeated k Times Go Hard
2013 Detect Squares Go Medium
2012 Sum of Beauty in the Array Go Medium
2011 Final Value of Variable After Performing Operations Go Easy
2010 The Number of Seniors and Juniors to Join the Company II 🔒 MySQL Hard
2009 Minimum Number of Operations to Make Array Continuous Go Hard
2008 Maximum Earnings From Taxi Go Medium
2007 Find Original Array From Doubled Array Go Medium
2006 Count Number of Pairs With Absolute Difference K Go Easy
2005 Subtree Removal Game with Fibonacci Tree 🔒 Go Hard
2004 The Number of Seniors and Juniors to Join the Company 🔒 MySQL Hard
2003 Smallest Missing Genetic Value in Each Subtree Go Hard
2002 Maximum Product of the Length of Two Palindromic Subsequences Go Medium
2001 Number of Pairs of Interchangeable Rectangles Go Medium
2000 Reverse Prefix of Word Go Easy
1999 Smallest Greater Multiple Made of Two Digits 🔒 Go Medium
1998 GCD Sort of an Array Go Hard
1997 First Day Where You Have Been in All the Rooms Go Medium
1996 The Number of Weak Characters in the Game Go Medium
1995 Count Special Quadruplets Go Easy
1994 The Number of Good Subsets Go Hard
1993 Operations on Tree Go Medium
1992 Find All Groups of Farmland Go Medium
1991 Find the Middle Index in Array Go Easy
1990 Count the Number of Experiments 🔒 MySQL Medium
1989 Maximum Number of People That Can Be Caught in Tag 🔒 Go Medium
1988 Find Cutoff Score for Each School 🔒 MySQL Medium
1987 Number of Unique Good Subsequences Go Hard
1986 Minimum Number of Work Sessions to Finish the Tasks Go Medium
1985 Find the Kth Largest Integer in the Array Go Medium
1984 Minimum Difference Between Highest and Lowest of K Scores Go Easy
1983 Widest Pair of Indices With Equal Range Sum 🔒 Go Medium
1982 Find Array Given Subset Sums Go Hard
1981 Minimize the Difference Between Target and Chosen Elements Go Medium
1980 Find Unique Binary String Go Medium
1979 Find Greatest Common Divisor of Array Go Easy
1978 Employees Whose Manager Left the Company 🔒 MySQL Easy
1977 Number of Ways to Separate Numbers Go Hard
1976 Number of Ways to Arrive at Destination Go Medium
1975 Maximum Matrix Sum Go Medium
1974 Minimum Time to Type Word Using Special Typewriter Go Easy
1973 Count Nodes Equal to Sum of Descendants 🔒 Go Medium
1972 First and Last Call On the Same Day 🔒 MySQL Hard
1971 Find if Path Exists in Graph Go Easy
1970 Last Day Where You Can Still Cross Go Hard
1969 Minimum Non-Zero Product of the Array Elements Go Medium
1968 Array With Elements Not Equal to Average of Neighbors Go Medium
1967 Number of Strings That Appear as Substrings in Word Go Easy
1966 Binary Searchable Numbers in an Unsorted Array 🔒 Go Medium
1965 Employees With Missing Information 🔒 MySQL Easy
1964 Find the Longest Valid Obstacle Course at Each Position Go Hard
1963 Minimum Number of Swaps to Make the String Balanced Go Medium
1962 Remove Stones to Minimize the Total Go Medium
1961 Check If String Is a Prefix of Array Go Easy
1960 Maximum Product of the Length of Two Palindromic Substrings Go Hard
1959 Minimum Total Space Wasted With K Resizing Operations Go Medium
1958 Check if Move is Legal Go Medium
1957 Delete Characters to Make Fancy String Go Easy
1956 Minimum Time For K Virus Variants to Spread 🔒 Go Hard
1955 Count Number of Special Subsequences Go Hard
1954 Minimum Garden Perimeter to Collect Enough Apples Go Medium
1953 Maximum Number of Weeks for Which You Can Work Go Medium
1952 Three Divisors Go Easy
1951 All the Pairs With the Maximum Number of Common Followers 🔒 MySQL Medium
1950 Maximum of Minimum Values in All Subarrays 🔒 Go Medium
1949 Strong Friendship 🔒 MySQL Medium
1948 Delete Duplicate Folders in System Go Hard
1947 Maximum Compatibility Score Sum Go Medium
1946 Largest Number After Mutating Substring Go Medium
1945 Sum of Digits of String After Convert Go Easy
1944 Number of Visible People in a Queue Go Hard
1943 Describe the Painting Go Medium
1942 The Number of the Smallest Unoccupied Chair Go Medium
1941 Check if All Characters Have Equal Number of Occurrences Go Easy
1940 Longest Common Subsequence Between Sorted Arrays 🔒 Go Medium
1939 Users That Actively Request Confirmation Messages 🔒 MySQL Easy
1938 Maximum Genetic Difference Query Go Hard
1937 Maximum Number of Points with Cost Go Medium
1936 Add Minimum Number of Rungs Go Medium
1935 Maximum Number of Words You Can Type Go Easy
1934 Confirmation Rate 🔒 MySQL Medium
1933 Check if String Is Decomposable Into Value-Equal Substrings 🔒 Go Easy
1932 Merge BSTs to Create Single BST Go Hard
1931 Painting a Grid With Three Different Colors Go Hard
1930 Unique Length-3 Palindromic Subsequences Go Medium
1929 Concatenation of Array Go Easy
1928 Minimum Cost to Reach Destination in Time Go Hard
1927 Sum Game Go Medium
1926 Nearest Exit from Entrance in Maze Go Medium
1925 Count Square Sum Triples Go Easy
1924 Erect the Fence II 🔒 Go Hard
1923 Longest Common Subpath Go Hard
1922 Count Good Numbers Go Medium
1921 Eliminate Maximum Number of Monsters Go Medium
1920 Build Array from Permutation Go Easy
1919 Leetcodify Similar Friends 🔒 MySQL Hard
1918 Kth Smallest Subarray Sum 🔒 Go Medium
1917 Leetcodify Friends Recommendations 🔒 MySQL Hard
1916 Count Ways to Build Rooms in an Ant Colony Go Hard
1915 Number of Wonderful Substrings Go Medium
1914 Cyclically Rotating a Grid Go Medium
1913 Maximum Product Difference Between Two Pairs Go Easy
1912 Design Movie Rental System Go Hard
1911 Maximum Alternating Subsequence Sum Go Medium
1910 Remove All Occurrences of a Substring Go Medium
1909 Remove One Element to Make the Array Strictly Increasing Go Easy
1908 Game of Nim 🔒 Go Medium
1907 Count Salary Categories 🔒 MySQL Medium
1906 Minimum Absolute Difference Queries Go Medium
1905 Count Sub Islands Go Medium
1904 The Number of Full Rounds You Have Played Go Medium
1903 Largest Odd Number in String Go Easy
1902 Depth of BST Given Insertion Order 🔒 Go Medium
1901 Find a Peak Element II Go Medium
1900 The Earliest and Latest Rounds Where Players Compete Go Hard
1899 Merge Triplets to Form Target Triplet Go Medium
1898 Maximum Number of Removable Characters Go Medium
1897 Redistribute Characters to Make All Strings Equal Go Easy
1896 Minimum Cost to Change the Final Value of Expression Go Hard
1895 Largest Magic Square Go Medium
1894 Find the Student that Will Replace the Chalk Go Medium
1893 Check if All the Integers in a Range Are Covered Go Easy
1892 Page Recommendations II 🔒 MySQL Hard
1891 Cutting Ribbons 🔒 Go Medium
1890 The Latest Login in 2020 🔒 MySQL Easy
1889 Minimum Space Wasted From Packaging Go Hard
1888 Minimum Number of Flips to Make the Binary String Alternating Go Medium
1887 Reduction Operations to Make the Array Elements Equal Go Medium
1886 Determine Whether Matrix Can Be Obtained By Rotation Go Easy
1885 Count Pairs in Two Arrays 🔒 Go Medium
1884 Egg Drop With 2 Eggs and N Floors Go Medium
1883 Minimum Skips to Arrive at Meeting On Time Go Hard
1882 Process Tasks Using Servers Go Medium
1881 Maximum Value after Insertion Go Medium
1880 Check if Word Equals Summation of Two Words Go Easy
1879 Minimum XOR Sum of Two Arrays Go Hard
1878 Get Biggest Three Rhombus Sums in a Grid Go Medium
1877 Minimize Maximum Pair Sum in Array Go Medium
1876 Substrings of Size Three with Distinct Characters Go Easy
1875 Group Employees of the Same Salary 🔒 MySQL Medium
1874 Minimize Product Sum of Two Arrays 🔒 Go Medium
1873 Calculate Special Bonus 🔒 MySQL Easy
1872 Stone Game VIII Go Hard
1871 Jump Game VII Go Medium
1870 Minimum Speed to Arrive on Time Go Medium
1869 Longer Contiguous Segments of Ones than Zeros Go Easy
1868 Product of Two Run-Length Encoded Arrays 🔒 Go Medium
1867 Orders With Maximum Quantity Above Average 🔒 MySQL Medium
1866 Number of Ways to Rearrange Sticks With K Sticks Visible Go Hard
1865 Finding Pairs With a Certain Sum Go Medium
1864 Minimum Number of Swaps to Make the Binary String Alternating Go Medium
1863 Sum of All Subset XOR Totals Go Easy
1862 Sum of Floored Pairs Go Hard
1861 Rotating the Box Go Medium
1860 Incremental Memory Leak Go Medium
1859 Sorting the Sentence Go Easy
1858 Longest Word With All Prefixes 🔒 Go Medium
1857 Largest Color Value in a Directed Graph Go Hard
1856 Maximum Subarray Min-Product Go Medium
1855 Maximum Distance Between a Pair of Values Go Medium
1854 Maximum Population Year Go Easy
1853 Convert Date Format 🔒 MySQL Easy
1852 Distinct Numbers in Each Subarray 🔒 Go Medium
1851 Minimum Interval to Include Each Query Go Hard
1850 Minimum Adjacent Swaps to Reach the Kth Smallest Number Go Medium
1849 Splitting a String Into Descending Consecutive Values Go Medium
1848 Minimum Distance to the Target Element Go Easy
1847 Closest Room Go Hard
1846 Maximum Element After Decreasing and Rearranging Go Medium
1845 Seat Reservation Manager Go Medium
1844 Replace All Digits with Characters Go Easy
1843 Suspicious Bank Accounts 🔒 MySQL Medium
1842 Next Palindrome Using Same Digits 🔒 Go Hard
1841 League Statistics 🔒 MySQL Medium
1840 Maximum Building Height Go Hard
1839 Longest Substring Of All Vowels in Order Go Medium
1838 Frequency of the Most Frequent Element Go Medium
1837 Sum of Digits in Base K Go Easy
1836 Remove Duplicates From an Unsorted Linked List 🔒 Go Medium
1835 Find XOR Sum of All Pairs Bitwise AND Go Hard
1834 Single-Threaded CPU Go Medium
1833 Maximum Ice Cream Bars Go Medium
1832 Check if the Sentence Is Pangram Go Easy
1831 Maximum Transaction Each Day 🔒 MySQL Medium
1830 Minimum Number of Operations to Make String Sorted Go Hard
1829 Maximum XOR for Each Query Go Medium
1828 Queries on Number of Points Inside a Circle Go Medium
1827 Minimum Operations to Make the Array Increasing Go Easy
1826 Faulty Sensor 🔒 Go Easy
1825 Finding MK Average Go Hard
1824 Minimum Sideway Jumps Go Medium
1823 Find the Winner of the Circular Game Go Medium
1822 Sign of the Product of an Array Go Easy
1821 Find Customers With Positive Revenue this Year 🔒 MySQL Easy
1820 Maximum Number of Accepted Invitations 🔒 Go Medium
1819 Number of Different Subsequences GCDs Go Hard
1818 Minimum Absolute Sum Difference Go Medium
1817 Finding the Users Active Minutes Go Medium
1816 Truncate Sentence Go Easy
1815 Maximum Number of Groups Getting Fresh Donuts Go Hard
1814 Count Nice Pairs in an Array Go Medium
1813 Sentence Similarity III Go Medium
1812 Determine Color of a Chessboard Square Go Easy
1811 Find Interview Candidates 🔒 MySQL Medium
1810 Minimum Path Cost in a Hidden Grid 🔒 Go Medium
1809 Ad-Free Sessions 🔒 MySQL Easy
1808 Maximize Number of Nice Divisors Go Hard
1807 Evaluate the Bracket Pairs of a String Go Medium
1806 Minimum Number of Operations to Reinitialize a Permutation Go Medium
1805 Number of Different Integers in a String Go Easy
1804 Implement Trie II (Prefix Tree) 🔒 Go Medium
1803 Count Pairs With XOR in a Range Go Hard
1802 Maximum Value at a Given Index in a Bounded Array Go Medium
1801 Number of Orders in the Backlog Go Medium