Skip to content
LeetCode Problems' Solutions
Go TSQL Python Other
Branch: master
Clone or download
Latest commit 2f43eb8 Jan 16, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
helper v1.5.0 Nov 25, 2019
internal Add: 19 Jan 16, 2020
problems Add: new Jan 16, 2020
readme Add: new Jan 2, 2020
tag Add: new Jan 13, 2020
.gitignore Add: v1.4.1 Jun 22, 2019
.travis.yml Add: go1.13 Sep 13, 2019
LICENSE Update: License May 18, 2019
README.md Add: new Jan 16, 2020
go.mod Upgrade: go1.13 Sep 13, 2019
main.go v1.5.1 Nov 26, 2019

README.md

LeetCode

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

Build Status 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]
# Title Solution Difficulty
1321 Restaurant Growth 🔒 MySQL Medium
1320 Minimum Distance to Type a Word Using Two Fingers Go Hard
1319 Number of Operations to Make Network Connected Go Medium
1318 Minimum Flips to Make a OR b Equal to c Go Medium
1317 Convert Integer to the Sum of Two No-Zero Integers Go Easy
1316 Distinct Echo Substrings Go Hard
1315 Sum of Nodes with Even-Valued Grandparent Go Medium
1314 Matrix Block Sum Go Medium
1313 Decompress Run-Length Encoded List Go Easy
1312 Minimum Insertion Steps to Make a String Palindrome Go Hard
1311 Get Watched Videos by Your Friends Go Medium
1310 XOR Queries of a Subarray Go Medium
1309 Decrypt String from Alphabet to Integer Mapping Go Easy
1308 Running Total for Different Genders 🔒 MySQL Medium
1307 Verbal Arithmetic Puzzle Go Hard
1306 Jump Game III Go Medium
1305 All Elements in Two Binary Search Trees Go Medium
1304 Find N Unique Integers Sum up to Zero Go Easy
1303 Find the Team Size 🔒 MySQL Easy
1302 Deepest Leaves Sum Go Medium
1301 Number of Paths with Max Score Go Hard
1300 Sum of Mutated Array Closest to Target Go Medium
1299 Replace Elements with Greatest Element on Right Side Go Easy
1298 Maximum Candies You Can Get from Boxes Go Hard
1297 Maximum Number of Occurrences of a Substring Go Medium
1296 Divide Array in Sets of K Consecutive Numbers Go Medium
1295 Find Numbers with Even Number of Digits Go Easy
1294 Weather Type in Each Country 🔒 MySQL Easy
1293 Shortest Path in a Grid with Obstacles Elimination Go Hard
1292 Maximum Side Length of a Square with Sum Less than or Equal to Threshold Go Medium
1291 Sequential Digits Go Medium
1290 Convert Binary Number in a Linked List to Integer Go Easy
1289 Minimum Falling Path Sum II Go Hard
1288 Remove Covered Intervals Go Medium
1287 Element Appearing More Than 25% In Sorted Array Go Easy
1286 Iterator for Combination Go Medium
1285 Find the Start and End Number of Continuous Ranges 🔒 MySQL Medium
1284 Minimum Number of Flips to Convert Binary Matrix to Zero Matrix Go Hard
1283 Find the Smallest Divisor Given a Threshold Go Medium
1282 Group the People Given the Group Size They Belong To Go Medium
1281 Subtract the Product and Sum of Digits of an Integer Go Easy
1280 Students and Examinations 🔒 MySQL Easy
1279 Traffic Light Controlled Intersection 🔒 Go Easy
1278 Palindrome Partitioning III Go Hard
1277 Count Square Submatrices with All Ones Go Medium
1276 Number of Burgers with No Waste of Ingredients Go Medium
1275 Find Winner on a Tic Tac Toe Game Go Easy
1274 Number of Ships in a Rectangle 🔒 Go Hard
1273 Delete Tree Nodes 🔒 Go Medium
1272 Remove Interval 🔒 Go Medium
1271 Hexspeak 🔒 Go Easy
1270 All People Report to the Given Manager 🔒 MySQL Medium
1269 Number of Ways to Stay in the Same Place After Some Steps Go Hard
1268 Search Suggestions System Go Medium
1267 Count Servers that Communicate Go Medium
1266 Minimum Time Visiting All Points Go Easy
1265 Print Immutable Linked List in Reverse 🔒 Go Medium
1264 Page Recommendations 🔒 MySQL Medium
1263 Minimum Moves to Move a Box to Their Target Location Go Hard
1262 Greatest Sum Divisible by Three Go Medium
1261 Find Elements in a Contaminated Binary Tree Go Medium
1260 Shift 2D Grid Go Easy
1259 Handshakes That Don't Cross 🔒 Go Hard
1258 Synonymous Sentences 🔒 Go Medium
1257 Smallest Common Region 🔒 Go Medium
1256 Encode Number 🔒 Go Medium
1255 Maximum Score Words Formed by Letters Go Hard
1254 Number of Closed Islands Go Medium
1253 Reconstruct a 2-Row Binary Matrix Go Medium
1252 Cells with Odd Values in a Matrix Go Easy
1251 Average Selling Price 🔒 MySQL Easy
1250 Check If It Is a Good Array Go Hard
1249 Minimum Remove to Make Valid Parentheses Go Medium
1248 Count Number of Nice Subarrays Go Medium
1247 Minimum Swaps to Make Strings Equal Go Medium
1246 Palindrome Removal 🔒 Go Hard
1245 Tree Diameter 🔒 Go Medium
1244 Design A Leaderboard 🔒 Go Medium
1243 Array Transformation 🔒 Go Easy
1242 Web Crawler Multithreaded 🔒 Go Medium
1241 Number of Comments per Post 🔒 MySQL Easy
1240 Tiling a Rectangle with the Fewest Squares Go Hard
1239 Maximum Length of a Concatenated String with Unique Characters Go Medium
1238 Circular Permutation in Binary Representation Go Medium
1237 Find Positive Integer Solution for a Given Equation Go Easy
1236 Web Crawler 🔒 Go Medium
1235 Maximum Profit in Job Scheduling Go Hard
1234 Replace the Substring for Balanced String Go Medium
1233 Remove Sub-Folders from the Filesystem Go Medium
1232 Check If It Is a Straight Line Go Easy
1231 Divide Chocolate 🔒 Go Hard
1230 Toss Strange Coins 🔒 Go Medium
1229 Meeting Scheduler 🔒 Go Medium
1228 Missing Number In Arithmetic Progression 🔒 Go Easy
1227 Airplane Seat Assignment Probability Go Medium
1226 The Dining Philosophers Go Medium
1225 Report Contiguous Dates 🔒 MySQL Hard
1224 Maximum Equal Frequency Go Hard
1223 Dice Roll Simulation Go Medium
1222 Queens That Can Attack the King Go Medium
1221 Split a String in Balanced Strings Go Easy
1220 Count Vowels Permutation Go Hard
1219 Path with Maximum Gold Go Medium
1218 Longest Arithmetic Subsequence of Given Difference Go Medium
1217 Play with Chips Go Easy
1216 Valid Palindrome III 🔒 Go Hard
1215 Stepping Numbers 🔒 Go Medium
1214 Two Sum BSTs 🔒 Go Medium
1213 Intersection of Three Sorted Arrays 🔒 Go Easy
1212 Team Scores in Football Tournament 🔒 MySQL Medium
1211 Queries Quality and Percentage 🔒 MySQL Easy
1210 Minimum Moves to Reach Target with Rotations Go Hard
1209 Remove All Adjacent Duplicates in String II Go Medium
1208 Get Equal Substrings Within Budget Go Medium
1207 Unique Number of Occurrences Go Easy
1206 Design Skiplist Go Hard
1205 Monthly Transactions II 🔒 MySQL Medium
1204 Last Person to Fit in the Elevator 🔒 MySQL Medium
1203 Sort Items by Groups Respecting Dependencies Go Hard
1202 Smallest String With Swaps Go Medium
1201 Ugly Number III Go Medium
1200 Minimum Absolute Difference Go Easy
1199 Minimum Time to Build Blocks 🔒 Go Hard
1198 Find Smallest Common Element in All Rows 🔒 Go Medium
1197 Minimum Knight Moves 🔒 Go Medium
1196 How Many Apples Can You Put into the Basket 🔒 Go Easy
1195 Fizz Buzz Multithreaded Go Medium
1194 Tournament Winners 🔒 MySQL Hard
1193 Monthly Transactions I 🔒 MySQL Medium
1192 Critical Connections in a Network Go Hard
1191 K-Concatenation Maximum Sum Go Medium
1190 Reverse Substrings Between Each Pair of Parentheses Go Medium
1189 Maximum Number of Balloons Go Easy
1188 Design Bounded Blocking Queue 🔒 Go Medium
1187 Make Array Strictly Increasing Go Hard
1186 Maximum Subarray Sum with One Deletion Go Medium
1185 Day of the Week Go Easy
1184 Distance Between Bus Stops Go Easy
1183 Maximum Number of Ones 🔒 Go Hard
1182 Shortest Distance to Target Color 🔒 Go Medium
1181 Before and After Puzzle 🔒 Go Medium
1180 Count Substrings with Only One Distinct Letter 🔒 Go Easy
1179 Reformat Department Table MySQL Easy
1178 Number of Valid Words for Each Puzzle Go Hard
1177 Can Make Palindrome from Substring Go Medium
1176 Diet Plan Performance 🔒 Go Easy
1175 Prime Arrangements Go Easy
1174 Immediate Food Delivery II 🔒 MySQL Medium
1173 Immediate Food Delivery I 🔒 MySQL Easy
1172 Dinner Plate Stacks Go Hard
1171 Remove Zero Sum Consecutive Nodes from Linked List Go Medium
1170 Compare Strings by Frequency of the Smallest Character Go Easy
1169 Invalid Transactions Go Medium
1168 Optimize Water Distribution in a Village 🔒 Go Hard
1167 Minimum Cost to Connect Sticks 🔒 Go Medium
1166 Design File System 🔒 Go Medium
1165 Single-Row Keyboard 🔒 Go Easy
1164 Product Price at a Given Date 🔒 MySQL Medium
1163 Last Substring in Lexicographical Order Go Hard
1162 As Far from Land as Possible Go Medium
1161 Maximum Level Sum of a Binary Tree Go Medium
1160 Find Words That Can Be Formed by Characters Go Easy
1159 Market Analysis II 🔒 MySQL Hard
1158 Market Analysis I 🔒 MySQL Medium
1157 Online Majority Element In Subarray Go Hard
1156 Swap For Longest Repeated Character Substring Go Medium
1155 Number of Dice Rolls With Target Sum Go Medium
1154 Day of the Year Go Easy
1153 String Transforms Into Another String 🔒 Go Hard
1152 Analyze User Website Visit Pattern 🔒 Go Medium
1151 Minimum Swaps to Group All 1's Together 🔒 Go Medium
1150 Check If a Number Is Majority Element in a Sorted Array 🔒 Go Easy
1149 Article Views II 🔒 MySQL Medium
1148 Article Views I 🔒 MySQL Easy
1147 Longest Chunked Palindrome Decomposition Go Hard
1146 Snapshot Array Go Medium
1145 Binary Tree Coloring Game Go Medium
1144 Decrease Elements To Make Array Zigzag Go Medium
1143 Longest Common Subsequence Go Medium
1142 User Activity for the Past 30 Days II 🔒 MySQL Easy
1141 User Activity for the Past 30 Days I 🔒 MySQL Easy
1140 Stone Game II Go Medium
1139 Largest 1-Bordered Square Go Medium
1138 Alphabet Board Path Go Medium
1137 N-th Tribonacci Number Go Easy
1136 Parallel Courses 🔒 Go Hard
1135 Connecting Cities With Minimum Cost 🔒 Go Medium
1134 Armstrong Number 🔒 Go Easy
1133 Largest Unique Number 🔒 Go Easy
1132 Reported Posts II 🔒 MySQL Medium
1131 Maximum of Absolute Value Expression Go Medium
1130 Minimum Cost Tree From Leaf Values Go Medium
1129 Shortest Path with Alternating Colors Go Medium
1128 Number of Equivalent Domino Pairs Go Easy
1127 User Purchase Platform 🔒 MySQL Hard
1126 Active Businesses 🔒 MySQL Medium
1125 Smallest Sufficient Team Go Hard
1124 Longest Well-Performing Interval Go Medium
1123 Lowest Common Ancestor of Deepest Leaves Go Medium
1122 Relative Sort Array Go Easy
1121 Divide Array Into Increasing Sequences 🔒 Go Hard
1120 Maximum Average Subtree 🔒 Go Medium
1119 Remove Vowels from a String 🔒 Go Easy
1118 Number of Days in a Month 🔒 Go Easy
1117 Building H2O Go Medium
1116 Print Zero Even Odd Go Medium
1115 Print FooBar Alternately Go Medium
1114 Print in Order Go Easy
1113 Reported Posts 🔒 MySQL Easy
1112 Highest Grade For Each Student 🔒 MySQL Medium
1111 Maximum Nesting Depth of Two Valid Parentheses Strings Go Medium
1110 Delete Nodes And Return Forest Go Medium
1109 Corporate Flight Bookings Go Medium
1108 Defanging an IP Address Go Easy
1107 New Users Daily Count 🔒 MySQL Medium
1106 Parsing A Boolean Expression Go Hard
1105 Filling Bookcase Shelves Go Medium
1104 Path In Zigzag Labelled Binary Tree Go Medium
1103 Distribute Candies to People Go Easy
1102 Path With Maximum Minimum Value 🔒 Go Medium
1101 The Earliest Moment When Everyone Become Friends 🔒 Go Medium
1100 Find K-Length Substrings With No Repeated Characters 🔒 Go Medium
1099 Two Sum Less Than K 🔒 Go Easy
1098 Unpopular Books 🔒 MySQL Medium
1097 Game Play Analysis V 🔒 MySQL Hard
1096 Brace Expansion II Go Hard
1095 Find in Mountain Array Go Hard
1094 Car Pooling Go Medium
1093 Statistics from a Large Sample Go Medium
1092 Shortest Common Supersequence Go Hard
1091 Shortest Path in Binary Matrix Go Medium
1090 Largest Values From Labels Go Medium
1089 Duplicate Zeros Go Easy
1088 Confusing Number II 🔒 Go Hard
1087 Brace Expansion 🔒 Go Medium
1086 High Five 🔒 Go Easy
1085 Sum of Digits in the Minimum Number 🔒 Go Easy
1084 Sales Analysis III 🔒 MySQL Easy
1083 Sales Analysis II 🔒 MySQL Easy
1082 Sales Analysis I 🔒 MySQL Easy
1081 Smallest Subsequence of Distinct Characters Go Medium
1080 Insufficient Nodes in Root to Leaf Paths Go Medium
1079 Letter Tile Possibilities Go Medium
1078 Occurrences After Bigram Go Easy
1077 Project Employees III 🔒 MySQL Medium
1076 Project Employees II 🔒 MySQL Easy
1075 Project Employees I 🔒 MySQL Easy
1074 Number of Submatrices That Sum to Target Go Hard
1073 Adding Two Negabinary Numbers Go Medium
1072 Flip Columns For Maximum Number of Equal Rows Go Medium
1071 Greatest Common Divisor of Strings Go Easy
1070 Product Sales Analysis III 🔒 MySQL Medium
1069 Product Sales Analysis II 🔒 MySQL Easy
1068 Product Sales Analysis I 🔒 MySQL Easy
1067 Digit Count in Range 🔒 Go Hard
1066 Campus Bikes II 🔒 Go Medium
1065 Index Pairs of a String 🔒 Go Easy
1064 Fixed Point 🔒 Go Easy
1063 Number of Valid Subarrays 🔒 Go Hard
1062 Longest Repeating Substring 🔒 Go Medium
1061 Lexicographically Smallest Equivalent String 🔒 Go Medium
1060 Missing Element in Sorted Array 🔒 Go Medium
1059 All Paths from Source Lead to Destination 🔒 Go Medium
1058 Minimize Rounding Error to Meet Target 🔒 Go Medium
1057 Campus Bikes 🔒 Go Medium
1056 Confusing Number 🔒 Go Easy
1055 Shortest Way to Form String 🔒 Go Medium
1054 Distant Barcodes Go Medium
1053 Previous Permutation With One Swap Go Medium
1052 Grumpy Bookstore Owner Go Medium
1051 Height Checker Go Easy
1050 Actors and Directors Who Cooperated At Least Three Times 🔒 MySQL Easy
1049 Last Stone Weight II Go Medium
1048 Longest String Chain Go Medium
1047 Remove All Adjacent Duplicates In String Go Easy
1046 Last Stone Weight Go Easy
1045 Customers Who Bought All Products 🔒 MySQL Medium
1044 Longest Duplicate Substring Go Hard
1043 Partition Array for Maximum Sum Go Medium
1042 Flower Planting With No Adjacent Go Easy
1041 Robot Bounded In Circle Go Medium
1040 Moving Stones Until Consecutive II Go Medium
1039 Minimum Score Triangulation of Polygon Go Medium
1038 Binary Search Tree to Greater Sum Tree Go Medium
1037 Valid Boomerang Go Easy
1036 Escape a Large Maze Go Hard
1035 Uncrossed Lines Go Medium
1034 Coloring A Border Go Medium
1033 Moving Stones Until Consecutive Go Easy
1032 Stream of Characters Go Hard
1031 Maximum Sum of Two Non-Overlapping Subarrays Go Medium
1030 Matrix Cells in Distance Order Go Easy
1029 Two City Scheduling Go Easy
1028 Recover a Tree From Preorder Traversal Go Hard
1027 Longest Arithmetic Sequence Go Medium
1026 Maximum Difference Between Node and Ancestor Go Medium
1025 Divisor Game Go Easy
1024 Video Stitching Go Medium
1023 Camelcase Matching Go Medium
1022 Sum of Root To Leaf Binary Numbers Go Easy
1021 Remove Outermost Parentheses Go Easy
1020 Number of Enclaves Go Medium
1019 Next Greater Node In Linked List Go Medium
1018 Binary Prefix Divisible By 5 Go Easy
1017 Convert to Base -2 Go Medium
1016 Binary String With Substrings Representing 1 To N Go Medium
1015 Smallest Integer Divisible by K Go Medium
1014 Best Sightseeing Pair Go Medium
1013 Partition Array Into Three Parts With Equal Sum Go Easy
1012 Numbers With Repeated Digits Go Hard
1011 Capacity To Ship Packages Within D Days Go Medium
1010 Pairs of Songs With Total Durations Divisible by 60 Go Easy
1009 Complement of Base 10 Integer Go Easy
1008 Construct Binary Search Tree from Preorder Traversal Go Medium
1007 Minimum Domino Rotations For Equal Row Go Medium
1006 Clumsy Factorial Go Medium
1005 Maximize Sum Of Array After K Negations Go Easy
1004 Max Consecutive Ones III Go Medium
1003 Check If Word Is Valid After Substitutions Go Medium
1002 Find Common Characters Go Easy
1001 Grid Illumination Go Hard
1000 Minimum Cost to Merge Stones Go Hard
999 Available Captures for Rook Go Easy
998 Maximum Binary Tree II Go Medium
997 Find the Town Judge Go Easy
996 Number of Squareful Arrays Go Hard
995 Minimum Number of K Consecutive Bit Flips Go Hard
994 Rotting Oranges Go Easy
993 Cousins in Binary Tree Go Easy
992 Subarrays with K Different Integers Go Hard
991 Broken Calculator Go Medium
990 Satisfiability of Equality Equations Go Medium
989 Add to Array-Form of Integer Go Easy
988 Smallest String Starting From Leaf Go Medium
987 Vertical Order Traversal of a Binary Tree Go Medium
986 Interval List Intersections Go Medium
985 Sum of Even Numbers After Queries Go Easy
984 String Without AAA or BBB Go Medium
983 Minimum Cost For Tickets Go Medium
982 Triples with Bitwise AND Equal To Zero Go Hard
981 Time Based Key-Value Store Go Medium
980 Unique Paths III Go Hard
979 Distribute Coins in Binary Tree Go Medium
978 Longest Turbulent Subarray Go Medium
977 Squares of a Sorted Array Go Easy
976 Largest Perimeter Triangle Go Easy
975 Odd Even Jump Go Hard
974 Subarray Sums Divisible by K Go Medium
973 K Closest Points to Origin Go Medium
972 Equal Rational Numbers Go Hard
971 Flip Binary Tree To Match Preorder Traversal Go Medium
970 Powerful Integers Go Easy
969 Pancake Sorting Go Medium
968 Binary Tree Cameras Go Hard
967 Numbers With Same Consecutive Differences Go Medium
966 Vowel Spellchecker Go Medium
965 Univalued Binary Tree Go Easy
964 Least Operators to Express Number Go Hard
963 Minimum Area Rectangle II Go Medium
962 Maximum Width Ramp Go Medium
961 N-Repeated Element in Size 2N Array Go Easy
960 Delete Columns to Make Sorted III Go Hard
959 Regions Cut By Slashes Go Medium
958 Check Completeness of a Binary Tree Go Medium
957 Prison Cells After N Days Go Medium
956 Tallest Billboard Go Hard
955 Delete Columns to Make Sorted II Go Medium
954 Array of Doubled Pairs Go Medium
953 Verifying an Alien Dictionary Go Easy
952 Largest Component Size by Common Factor Go Hard
951 Flip Equivalent Binary Trees Go Medium
950 Reveal Cards In Increasing Order Go Medium
949 Largest Time for Given Digits Go Easy
948 Bag of Tokens Go Medium
947 Most Stones Removed with Same Row or Column Go Medium
946 Validate Stack Sequences Go Medium
945 Minimum Increment to Make Array Unique Go Medium
944 Delete Columns to Make Sorted Go Easy
943 Find the Shortest Superstring Go Hard
942 DI String Match Go Easy
941 Valid Mountain Array Go Easy
940 Distinct Subsequences II Go Hard
939 Minimum Area Rectangle Go Medium
938 Range Sum of BST Go Easy
937 Reorder Data in Log Files Go Easy
936 Stamping The Sequence Go Hard
935 Knight Dialer Go Medium
934 Shortest Bridge Go Medium
933 Number of Recent Calls Go Easy
932 Beautiful Array Go Medium
931 Minimum Falling Path Sum Go Medium
930 Binary Subarrays With Sum Go Medium
929 Unique Email Addresses Go Easy
928 Minimize Malware Spread II Go Hard
927 Three Equal Parts Go Hard
926 Flip String to Monotone Increasing Go Medium
925 Long Pressed Name Go Easy
924 Minimize Malware Spread Go Hard
923 3Sum With Multiplicity Go Medium
922 Sort Array By Parity II Go Easy
921 Minimum Add to Make Parentheses Valid Go Medium
920 Number of Music Playlists Go Hard
919 Complete Binary Tree Inserter Go Medium
918 Maximum Sum Circular Subarray Go Medium
917 Reverse Only Letters Go Easy
916 Word Subsets Go Medium
915 Partition Array into Disjoint Intervals Go Medium
914 X of a Kind in a Deck of Cards Go Easy
913 Cat and Mouse Go Hard
912 Sort an Array Go Medium
911 Online Election Go Medium
910 Smallest Range II Go Medium
909 Snakes and Ladders Go Medium
908 Smallest Range I Go Easy
907 Sum of Subarray Minimums Go Medium
906 Super Palindromes Go Hard
905 Sort Array By Parity Go Easy
904 Fruit Into Baskets Go Medium
903 Valid Permutations for DI Sequence Go Hard
902 Numbers At Most N Given Digit Set Go Hard
901 Online Stock Span Go Medium
You can’t perform that action at this time.