Skip to content

Latest commit

 

History

History
388 lines (384 loc) · 74.8 KB

File metadata and controls

388 lines (384 loc) · 74.8 KB

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
1201 Ugly Number III Go Medium
1202 Smallest String With Swaps Go Medium
1203 Sort Items by Groups Respecting Dependencies Go Hard
1204 Last Person to Fit in the Bus 🔒 MySQL Medium
1205 Monthly Transactions II 🔒 MySQL Medium
1206 Design Skiplist Go Hard
1207 Unique Number of Occurrences Go Easy
1208 Get Equal Substrings Within Budget Go Medium
1209 Remove All Adjacent Duplicates in String II Go Medium
1210 Minimum Moves to Reach Target with Rotations Go Hard
1211 Queries Quality and Percentage 🔒 MySQL Easy
1212 Team Scores in Football Tournament 🔒 MySQL Medium
1213 Intersection of Three Sorted Arrays 🔒 Go Easy
1214 Two Sum BSTs 🔒 Go Medium
1215 Stepping Numbers 🔒 Go Medium
1216 Valid Palindrome III 🔒 Go Hard
1217 Minimum Cost to Move Chips to The Same Position Go Easy
1218 Longest Arithmetic Subsequence of Given Difference Go Medium
1219 Path with Maximum Gold Go Medium
1220 Count Vowels Permutation Go Hard
1221 Split a String in Balanced Strings Go Easy
1222 Queens That Can Attack the King Go Medium
1223 Dice Roll Simulation Go Hard
1224 Maximum Equal Frequency Go Hard
1225 Report Contiguous Dates 🔒 MySQL Hard
1226 The Dining Philosophers Go Medium
1227 Airplane Seat Assignment Probability Go Medium
1228 Missing Number In Arithmetic Progression 🔒 Go Easy
1229 Meeting Scheduler 🔒 Go Medium
1230 Toss Strange Coins 🔒 Go Medium
1231 Divide Chocolate 🔒 Go Hard
1232 Check If It Is a Straight Line Go Easy
1233 Remove Sub-Folders from the Filesystem Go Medium
1234 Replace the Substring for Balanced String Go Medium
1235 Maximum Profit in Job Scheduling Go Hard
1236 Web Crawler 🔒 Go Medium
1237 Find Positive Integer Solution for a Given Equation Go Medium
1238 Circular Permutation in Binary Representation Go Medium
1239 Maximum Length of a Concatenated String with Unique Characters Go Medium
1240 Tiling a Rectangle with the Fewest Squares Go Hard
1241 Number of Comments per Post 🔒 MySQL Easy
1242 Web Crawler Multithreaded 🔒 Go Medium
1243 Array Transformation 🔒 Go Easy
1244 Design A Leaderboard 🔒 Go Medium
1245 Tree Diameter 🔒 Go Medium
1246 Palindrome Removal 🔒 Go Hard
1247 Minimum Swaps to Make Strings Equal Go Medium
1248 Count Number of Nice Subarrays Go Medium
1249 Minimum Remove to Make Valid Parentheses Go Medium
1250 Check If It Is a Good Array Go Hard
1251 Average Selling Price 🔒 MySQL Easy
1252 Cells with Odd Values in a Matrix Go Easy
1253 Reconstruct a 2-Row Binary Matrix Go Medium
1254 Number of Closed Islands Go Medium
1255 Maximum Score Words Formed by Letters Go Hard
1256 Encode Number 🔒 Go Medium
1257 Smallest Common Region 🔒 Go Medium
1258 Synonymous Sentences 🔒 Go Medium
1259 Handshakes That Don't Cross 🔒 Go Hard
1260 Shift 2D Grid Go Easy
1261 Find Elements in a Contaminated Binary Tree Go Medium
1262 Greatest Sum Divisible by Three Go Medium
1263 Minimum Moves to Move a Box to Their Target Location Go Hard
1264 Page Recommendations 🔒 MySQL Medium
1265 Print Immutable Linked List in Reverse 🔒 Go Medium
1266 Minimum Time Visiting All Points Go Easy
1267 Count Servers that Communicate Go Medium
1268 Search Suggestions System Go Medium
1269 Number of Ways to Stay in the Same Place After Some Steps Go Hard
1270 All People Report to the Given Manager 🔒 MySQL Medium
1271 Hexspeak 🔒 Go Easy
1272 Remove Interval 🔒 Go Medium
1273 Delete Tree Nodes 🔒 Go Medium
1274 Number of Ships in a Rectangle 🔒 Go Hard
1275 Find Winner on a Tic Tac Toe Game Go Easy
1276 Number of Burgers with No Waste of Ingredients Go Medium
1277 Count Square Submatrices with All Ones Go Medium
1278 Palindrome Partitioning III Go Hard
1279 Traffic Light Controlled Intersection 🔒 Go Easy
1280 Students and Examinations 🔒 MySQL Easy
1281 Subtract the Product and Sum of Digits of an Integer Go Easy
1282 Group the People Given the Group Size They Belong To Go Medium
1283 Find the Smallest Divisor Given a Threshold Go Medium
1284 Minimum Number of Flips to Convert Binary Matrix to Zero Matrix Go Hard
1285 Find the Start and End Number of Continuous Ranges 🔒 MySQL Medium
1286 Iterator for Combination Go Medium
1287 Element Appearing More Than 25% In Sorted Array Go Easy
1288 Remove Covered Intervals Go Medium
1289 Minimum Falling Path Sum II Go Hard
1290 Convert Binary Number in a Linked List to Integer Go Easy
1291 Sequential Digits Go Medium
1292 Maximum Side Length of a Square with Sum Less than or Equal to Threshold Go Medium
1293 Shortest Path in a Grid with Obstacles Elimination Go Hard
1294 Weather Type in Each Country 🔒 MySQL Easy
1295 Find Numbers with Even Number of Digits Go Easy
1296 Divide Array in Sets of K Consecutive Numbers Go Medium
1297 Maximum Number of Occurrences of a Substring Go Medium
1298 Maximum Candies You Can Get from Boxes Go Hard
1299 Replace Elements with Greatest Element on Right Side Go Easy
1300 Sum of Mutated Array Closest to Target Go Medium
1301 Number of Paths with Max Score Go Hard
1302 Deepest Leaves Sum Go Medium
1303 Find the Team Size 🔒 MySQL Easy
1304 Find N Unique Integers Sum up to Zero Go Easy
1305 All Elements in Two Binary Search Trees Go Medium
1306 Jump Game III Go Medium
1307 Verbal Arithmetic Puzzle Go Hard
1308 Running Total for Different Genders 🔒 MySQL Medium
1309 Decrypt String from Alphabet to Integer Mapping Go Easy
1310 XOR Queries of a Subarray Go Medium
1311 Get Watched Videos by Your Friends Go Medium
1312 Minimum Insertion Steps to Make a String Palindrome Go Hard
1313 Decompress Run-Length Encoded List Go Easy
1314 Matrix Block Sum Go Medium
1315 Sum of Nodes with Even-Valued Grandparent Go Medium
1316 Distinct Echo Substrings Go Hard
1317 Convert Integer to the Sum of Two No-Zero Integers Go Easy
1318 Minimum Flips to Make a OR b Equal to c Go Medium
1319 Number of Operations to Make Network Connected Go Medium
1320 Minimum Distance to Type a Word Using Two Fingers Go Hard
1321 Restaurant Growth 🔒 MySQL Medium
1322 Ads Performance 🔒 MySQL Easy
1323 Maximum 69 Number Go Easy
1324 Print Words Vertically Go Medium
1325 Delete Leaves With a Given Value Go Medium
1326 Minimum Number of Taps to Open to Water a Garden Go Hard
1327 List the Products Ordered in a Period 🔒 MySQL Easy
1328 Break a Palindrome Go Medium
1329 Sort the Matrix Diagonally Go Medium
1330 Reverse Subarray To Maximize Array Value Go Hard
1331 Rank Transform of an Array Go Easy
1332 Remove Palindromic Subsequences Go Easy
1333 Filter Restaurants by Vegan-Friendly, Price and Distance Go Medium
1334 Find the City With the Smallest Number of Neighbors at a Threshold Distance Go Medium
1335 Minimum Difficulty of a Job Schedule Go Hard
1336 Number of Transactions per Visit 🔒 MySQL Hard
1337 The K Weakest Rows in a Matrix Go Easy
1338 Reduce Array Size to The Half Go Medium
1339 Maximum Product of Splitted Binary Tree Go Medium
1340 Jump Game V Go Hard
1341 Movie Rating 🔒 MySQL Medium
1342 Number of Steps to Reduce a Number to Zero Go Easy
1343 Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold Go Medium
1344 Angle Between Hands of a Clock Go Medium
1345 Jump Game IV Go Hard
1346 Check If N and Its Double Exist Go Easy
1347 Minimum Number of Steps to Make Two Strings Anagram Go Medium
1348 Tweet Counts Per Frequency Go Medium
1349 Maximum Students Taking Exam Go Hard
1350 Students With Invalid Departments 🔒 MySQL Easy
1351 Count Negative Numbers in a Sorted Matrix Go Easy
1352 Product of the Last K Numbers Go Medium
1353 Maximum Number of Events That Can Be Attended Go Medium
1354 Construct Target Array With Multiple Sums Go Hard
1355 Activity Participants 🔒 MySQL Medium
1356 Sort Integers by The Number of 1 Bits Go Easy
1357 Apply Discount Every n Orders Go Medium
1358 Number of Substrings Containing All Three Characters Go Medium
1359 Count All Valid Pickup and Delivery Options Go Hard
1360 Number of Days Between Two Dates Go Easy
1361 Validate Binary Tree Nodes Go Medium
1362 Closest Divisors Go Medium
1363 Largest Multiple of Three Go Hard
1364 Number of Trusted Contacts of a Customer 🔒 MySQL Medium
1365 How Many Numbers Are Smaller Than the Current Number Go Easy
1366 Rank Teams by Votes Go Medium
1367 Linked List in Binary Tree Go Medium
1368 Minimum Cost to Make at Least One Valid Path in a Grid Go Hard
1369 Get the Second Most Recent Activity 🔒 MySQL Hard
1370 Increasing Decreasing String Go Easy
1371 Find the Longest Substring Containing Vowels in Even Counts Go Medium
1372 Longest ZigZag Path in a Binary Tree Go Medium
1373 Maximum Sum BST in Binary Tree Go Hard
1374 Generate a String With Characters That Have Odd Counts Go Easy
1375 Number of Times Binary String Is Prefix-Aligned Go Medium
1376 Time Needed to Inform All Employees Go Medium
1377 Frog Position After T Seconds Go Hard
1378 Replace Employee ID With The Unique Identifier 🔒 MySQL Easy
1379 Find a Corresponding Node of a Binary Tree in a Clone of That Tree Go Medium
1380 Lucky Numbers in a Matrix Go Easy
1381 Design a Stack With Increment Operation Go Medium
1382 Balance a Binary Search Tree Go Medium
1383 Maximum Performance of a Team Go Hard
1384 Total Sales Amount by Year 🔒 MySQL Hard
1385 Find the Distance Value Between Two Arrays Go Easy
1386 Cinema Seat Allocation Go Medium
1387 Sort Integers by The Power Value Go Medium
1388 Pizza With 3n Slices Go Hard
1389 Create Target Array in the Given Order Go Easy
1390 Four Divisors Go Medium
1391 Check if There is a Valid Path in a Grid Go Medium
1392 Longest Happy Prefix Go Hard
1393 Capital Gain/Loss 🔒 MySQL Medium
1394 Find Lucky Integer in an Array Go Easy
1395 Count Number of Teams Go Medium
1396 Design Underground System Go Medium
1397 Find All Good Strings Go Hard
1398 Customers Who Bought Products A and B but Not C 🔒 MySQL Medium
1399 Count Largest Group Go Easy
1400 Construct K Palindrome Strings Go Medium
1401 Circle and Rectangle Overlapping Go Medium
1402 Reducing Dishes Go Hard
1403 Minimum Subsequence in Non-Increasing Order Go Easy
1404 Number of Steps to Reduce a Number in Binary Representation to One Go Medium
1405 Longest Happy String Go Medium
1406 Stone Game III Go Hard
1407 Top Travellers 🔒 MySQL Easy
1408 String Matching in an Array Go Easy
1409 Queries on a Permutation With Key Go Medium
1410 HTML Entity Parser Go Medium
1411 Number of Ways to Paint N × 3 Grid Go Hard
1412 Find the Quiet Students in All Exams 🔒 MySQL Hard
1413 Minimum Value to Get Positive Step by Step Sum Go Easy
1414 Find the Minimum Number of Fibonacci Numbers Whose Sum Is K Go Medium
1415 The k-th Lexicographical String of All Happy Strings of Length n Go Medium
1416 Restore The Array Go Hard
1417 Reformat The String Go Easy
1418 Display Table of Food Orders in a Restaurant Go Medium
1419 Minimum Number of Frogs Croaking Go Medium
1420 Build Array Where You Can Find The Maximum Exactly K Comparisons Go Hard
1421 NPV Queries 🔒 MySQL Easy
1422 Maximum Score After Splitting a String Go Easy
1423 Maximum Points You Can Obtain from Cards Go Medium
1424 Diagonal Traverse II Go Medium
1425 Constrained Subsequence Sum Go Hard
1426 Counting Elements 🔒 Go Easy
1427 Perform String Shifts 🔒 Go Easy
1428 Leftmost Column with at Least a One 🔒 Go Medium
1429 First Unique Number 🔒 Go Medium
1430 Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree 🔒 Go Medium
1431 Kids With the Greatest Number of Candies Go Easy
1432 Max Difference You Can Get From Changing an Integer Go Medium
1433 Check If a String Can Break Another String Go Medium
1434 Number of Ways to Wear Different Hats to Each Other Go Hard
1435 Create a Session Bar Chart 🔒 MySQL Easy
1436 Destination City Go Easy
1437 Check If All 1's Are at Least Length K Places Away Go Easy
1438 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Go Medium
1439 Find the Kth Smallest Sum of a Matrix With Sorted Rows Go Hard
1440 Evaluate Boolean Expression 🔒 MySQL Medium
1441 Build an Array With Stack Operations Go Easy
1442 Count Triplets That Can Form Two Arrays of Equal XOR Go Medium
1443 Minimum Time to Collect All Apples in a Tree Go Medium
1444 Number of Ways of Cutting a Pizza Go Hard
1445 Apples & Oranges 🔒 MySQL Medium
1446 Consecutive Characters Go Easy
1447 Simplified Fractions Go Medium
1448 Count Good Nodes in Binary Tree Go Medium
1449 Form Largest Integer With Digits That Add up to Target Go Hard
1450 Number of Students Doing Homework at a Given Time Go Easy
1451 Rearrange Words in a Sentence Go Medium
1452 People Whose List of Favorite Companies Is Not a Subset of Another List Go Medium
1453 Maximum Number of Darts Inside of a Circular Dartboard Go Hard
1454 Active Users 🔒 MySQL Medium
1455 Check If a Word Occurs As a Prefix of Any Word in a Sentence Go Easy
1456 Maximum Number of Vowels in a Substring of Given Length Go Medium
1457 Pseudo-Palindromic Paths in a Binary Tree Go Medium
1458 Max Dot Product of Two Subsequences Go Hard
1459 Rectangles Area 🔒 MySQL Medium
1460 Make Two Arrays Equal by Reversing Sub-arrays Go Easy
1461 Check If a String Contains All Binary Codes of Size K Go Medium
1462 Course Schedule IV Go Medium
1463 Cherry Pickup II Go Hard
1464 Maximum Product of Two Elements in an Array Go Easy
1465 Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts Go Medium
1466 Reorder Routes to Make All Paths Lead to the City Zero Go Medium
1467 Probability of a Two Boxes Having The Same Number of Distinct Balls Go Hard
1468 Calculate Salaries 🔒 MySQL Medium
1469 Find All The Lonely Nodes 🔒 Go Easy
1470 Shuffle the Array Go Easy
1471 The k Strongest Values in an Array Go Medium
1472 Design Browser History Go Medium
1473 Paint House III Go Hard
1474 Delete N Nodes After M Nodes of a Linked List 🔒 Go Easy
1475 Final Prices With a Special Discount in a Shop Go Easy
1476 Subrectangle Queries Go Medium
1477 Find Two Non-overlapping Sub-arrays Each With Target Sum Go Medium
1478 Allocate Mailboxes Go Hard
1479 Sales by Day of the Week 🔒 MySQL Hard
1480 Running Sum of 1d Array Go Easy
1481 Least Number of Unique Integers after K Removals Go Medium
1482 Minimum Number of Days to Make m Bouquets Go Medium
1483 Kth Ancestor of a Tree Node Go Hard
1484 Group Sold Products By The Date 🔒 MySQL Easy
1485 Clone Binary Tree With Random Pointer 🔒 Go Medium
1486 XOR Operation in an Array Go Easy
1487 Making File Names Unique Go Medium
1488 Avoid Flood in The City Go Medium
1489 Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree Go Hard
1490 Clone N-ary Tree 🔒 Go Medium
1491 Average Salary Excluding the Minimum and Maximum Salary Go Easy
1492 The kth Factor of n Go Medium
1493 Longest Subarray of 1's After Deleting One Element Go Medium
1494 Parallel Courses II Go Hard
1495 Friendly Movies Streamed Last Month 🔒 MySQL Easy
1496 Path Crossing Go Easy
1497 Check If Array Pairs Are Divisible by k Go Medium
1498 Number of Subsequences That Satisfy the Given Sum Condition Go Medium
1499 Max Value of Equation Go Hard
1500 Design a File Sharing System 🔒 Go Medium