Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mirinzhang/LeetCode-in-Go

 
 

Repository files navigation

LeetCode 的 Go 解答

LeetCode 排名 codecov Build Status

进度

统计规则:1.免费题,2.算法题,3.能用 Go 解答

Easy Medium Hard Total
Accepted 177 306 132 615
Total 189 315 136 640

题解

题号 题目 通过率 难度 收藏
1 Two Sum 38% Easy
2 Add Two Numbers 28% Medium
3 Longest Substring Without Repeating Characters 24% Medium
4 Median of Two Sorted Arrays 23% Hard
5 Longest Palindromic Substring 25% Medium
6 ZigZag Conversion 27% Medium
7 Reverse Integer 24% Easy
8 String to Integer (atoi) 14% Medium
9 Palindrome Number 37% Easy
10 Regular Expression Matching 24% Hard
11 Container With Most Water 37% Medium
12 Integer to Roman 46% Medium
13 Roman to Integer 48% Easy
14 Longest Common Prefix 31% Easy
15 3Sum 21% Medium
16 3Sum Closest 32% Medium
17 Letter Combinations of a Phone Number 37% Medium
18 4Sum 27% Medium
19 Remove Nth Node From End of List 33% Medium
20 Valid Parentheses 34% Easy
21 Merge Two Sorted Lists 42% Easy
22 Generate Parentheses 49% Medium
23 Merge k Sorted Lists 29% Hard
24 Swap Nodes in Pairs 39% Medium
25 Reverse Nodes in k-Group 32% Hard
26 Remove Duplicates from Sorted Array 37% Easy
27 Remove Element 41% Easy
28 Implement strStr() 29% Easy
29 Divide Two Integers 15% Medium
30 Substring with Concatenation of All Words 22% Hard
31 Next Permutation 29% Medium
32 Longest Valid Parentheses 23% Hard
33 Search in Rotated Sorted Array 31% Medium
34 Find First and Last Position of Element in Sorted Array 31% Medium
35 Search Insert Position 40% Easy
36 Valid Sudoku 38% Medium
37 Sudoku Solver 32% Hard
38 Count and Say 37% Easy
39 Combination Sum 42% Medium
40 Combination Sum II 36% Medium
41 First Missing Positive 26% Hard
42 Trapping Rain Water 38% Hard
43 Multiply Strings 28% Medium
44 Wildcard Matching 21% Hard
45 Jump Game II 26% Hard
46 Permutations 48% Medium
47 Permutations II 35% Medium
48 Rotate Image 42% Medium
49 Group Anagrams 39% Medium
50 Pow(x, n) 26% Medium
51 N-Queens 34% Hard
52 N-Queens II 47% Hard
53 Maximum Subarray 40% Easy
54 Spiral Matrix 27% Medium
55 Jump Game 29% Medium
56 Merge Intervals 32% Medium
57 Insert Interval 29% Hard
58 Length of Last Word 32% Easy
59 Spiral Matrix II 42% Medium
60 Permutation Sequence 30% Medium
61 Rotate List 24% Medium
62 Unique Paths 43% Medium
63 Unique Paths II 32% Medium
64 Minimum Path Sum 41% Medium
65 Valid Number 12% Hard
66 Plus One 39% Easy
67 Add Binary 34% Easy
68 Text Justification 20% Hard
69 Sqrt(x) 29% Easy
70 Climbing Stairs 41% Easy
71 Simplify Path 26% Medium
72 Edit Distance 33% Hard
73 Set Matrix Zeroes 37% Medium
74 Search a 2D Matrix 34% Medium
75 Sort Colors 39% Medium
76 Minimum Window Substring 27% Hard
77 Combinations 42% Medium
78 Subsets 46% Medium
79 Word Search 28% Medium
80 Remove Duplicates from Sorted Array II 37% Medium
81 Search in Rotated Sorted Array II 32% Medium
82 Remove Duplicates from Sorted List II 30% Medium
83 Remove Duplicates from Sorted List 40% Easy
84 Largest Rectangle in Histogram 28% Hard
85 Maximal Rectangle 30% Hard
86 Partition List 34% Medium
87 Scramble String 30% Hard
88 Merge Sorted Array 32% Easy
89 Gray Code 43% Medium
90 Subsets II 39% Medium
91 Decode Ways 20% Medium
92 Reverse Linked List II 31% Medium
93 Restore IP Addresses 28% Medium
94 Binary Tree Inorder Traversal 51% Medium
95 Unique Binary Search Trees II 32% Medium
96 Unique Binary Search Trees 42% Medium
97 Interleaving String 25% Hard
98 Validate Binary Search Tree 24% Medium
99 Recover Binary Search Tree 31% Hard
100 Same Tree 48% Easy
101 Symmetric Tree 40% Easy
102 Binary Tree Level Order Traversal 43% Medium
103 Binary Tree Zigzag Level Order Traversal 37% Medium
104 Maximum Depth of Binary Tree 55% Easy
105 Construct Binary Tree from Preorder and Inorder Traversal 35% Medium
106 Construct Binary Tree from Inorder and Postorder Traversal 34% Medium
107 Binary Tree Level Order Traversal II 43% Easy
108 Convert Sorted Array to Binary Search Tree 45% Easy
109 Convert Sorted List to Binary Search Tree 36% Medium
110 Balanced Binary Tree 38% Easy
111 Minimum Depth of Binary Tree 33% Easy
112 Path Sum 35% Easy
113 Path Sum II 36% Medium
114 Flatten Binary Tree to Linked List 37% Medium
115 Distinct Subsequences 32% Hard
118 Pascal's Triangle 41% Easy
119 Pascal's Triangle II 39% Easy
120 Triangle 35% Medium
121 Best Time to Buy and Sell Stock 43% Easy
122 Best Time to Buy and Sell Stock II 48% Easy
123 Best Time to Buy and Sell Stock III 30% Hard
124 Binary Tree Maximum Path Sum 27% Hard
125 Valid Palindrome 27% Easy
126 Word Ladder II 15% Hard
127 Word Ladder 20% Medium
128 Longest Consecutive Sequence 38% Hard
129 Sum Root to Leaf Numbers 38% Medium
130 Surrounded Regions 20% Medium
131 Palindrome Partitioning 36% Medium
132 Palindrome Partitioning II 25% Hard
134 Gas Station 30% Medium
135 Candy 25% Hard
136 Single Number 56% Easy
137 Single Number II 43% Medium
139 Word Break 32% Medium
140 Word Break II 24% Hard
143 Reorder List 27% Medium
144 Binary Tree Preorder Traversal 47% Medium
145 Binary Tree Postorder Traversal 43% Hard
146 LRU Cache 20% Hard
147 Insertion Sort List 34% Medium
148 Sort List 30% Medium
149 Max Points on a Line 15% Hard
150 Evaluate Reverse Polish Notation 29% Medium
152 Maximum Product Subarray 27% Medium
153 Find Minimum in Rotated Sorted Array 41% Medium
154 Find Minimum in Rotated Sorted Array II 38% Hard
155 Min Stack 32% Easy
162 Find Peak Element 39% Medium
164 Maximum Gap 30% Hard
165 Compare Version Numbers 21% Medium
166 Fraction to Recurring Decimal 18% Medium
167 Two Sum II - Input array is sorted 47% Easy
168 Excel Sheet Column Title 27% Easy
169 Majority Element 48% Easy
171 Excel Sheet Column Number 49% Easy
172 Factorial Trailing Zeroes 37% Easy
174 Dungeon Game 24% Hard
179 Largest Number 23% Medium
187 Repeated DNA Sequences 33% Medium
188 Best Time to Buy and Sell Stock IV 25% Hard
189 Rotate Array 26% Easy
198 House Robber 40% Easy
199 Binary Tree Right Side View 43% Medium
200 Number of Islands 37% Medium
201 Bitwise AND of Numbers Range 34% Medium
202 Happy Number 42% Easy
203 Remove Linked List Elements 33% Easy
204 Count Primes 26% Easy
205 Isomorphic Strings 35% Easy
206 Reverse Linked List 48% Easy
207 Course Schedule 34% Medium
208 Implement Trie (Prefix Tree) 32% Medium
209 Minimum Size Subarray Sum 32% Medium
210 Course Schedule II 30% Medium
211 Add and Search Word - Data structure design 26% Medium
212 Word Search II 25% Hard
213 House Robber II 34% Medium
214 Shortest Palindrome 25% Hard
215 Kth Largest Element in an Array 41% Medium
216 Combination Sum III 47% Medium
217 Contains Duplicate 47% Easy
218 The Skyline Problem 29% Hard
219 Contains Duplicate II 33% Easy
220 Contains Duplicate III 18% Medium
221 Maximal Square 30% Medium
223 Rectangle Area 34% Medium
224 Basic Calculator 29% Hard
225 Implement Stack using Queues 34% Easy
226 Invert Binary Tree 54% Easy
227 Basic Calculator II 30% Medium
228 Summary Ranges 32% Medium
229 Majority Element II 29% Medium
230 Kth Smallest Element in a BST 46% Medium
231 Power of Two 40% Easy
232 Implement Queue using Stacks 38% Easy
233 Number of Digit One 29% Hard
234 Palindrome Linked List 33% Easy
238 Product of Array Except Self 50% Medium
239 Sliding Window Maximum 34% Hard
240 Search a 2D Matrix II 39% Medium
241 Different Ways to Add Parentheses 46% Medium
242 Valid Anagram 48% Easy
257 Binary Tree Paths 42% Easy
258 Add Digits 52% Easy
260 Single Number III 53% Medium
263 Ugly Number 39% Easy
264 Ugly Number II 33% Medium
268 Missing Number 45% Easy
273 Integer to English Words 22% Hard
274 H-Index 33% Medium
275 H-Index II 35% Medium
279 Perfect Squares 38% Medium
282 Expression Add Operators 30% Hard
283 Move Zeroes 51% Easy
287 Find the Duplicate Number 45% Medium
289 Game of Life 37% Medium
290 Word Pattern 33% Easy
292 Nim Game 55% Easy
295 Find Median from Data Stream 30% Hard
299 Bulls and Cows 36% Medium
300 Longest Increasing Subsequence 39% Medium
301 Remove Invalid Parentheses 36% Hard
303 Range Sum Query - Immutable 33% Easy
304 Range Sum Query 2D - Immutable 27% Medium
306 Additive Number 27% Medium
307 Range Sum Query - Mutable 23% Medium
309 Best Time to Buy and Sell Stock with Cooldown 42% Medium
310 Minimum Height Trees 29% Medium
312 Burst Balloons 43% Hard
313 Super Ugly Number 38% Medium
315 Count of Smaller Numbers After Self 35% Hard
316 Remove Duplicate Letters 30% Hard
318 Maximum Product of Word Lengths 46% Medium
319 Bulb Switcher 43% Medium
321 Create Maximum Number 24% Hard
322 Coin Change 26% Medium
324 Wiggle Sort II 26% Medium
326 Power of Three 40% Easy
327 Count of Range Sum 30% Hard
328 Odd Even Linked List 45% Medium
329 Longest Increasing Path in a Matrix 37% Hard
330 Patching Array 32% Hard
331 Verify Preorder Serialization of a Binary Tree 37% Medium
332 Reconstruct Itinerary 30% Medium
334 Increasing Triplet Subsequence 39% Medium
335 Self Crossing 26% Hard
336 Palindrome Pairs 27% Hard
337 House Robber III 45% Medium
338 Counting Bits 62% Medium
342 Power of Four 39% Easy
343 Integer Break 46% Medium
344 Reverse String 60% Easy
345 Reverse Vowels of a String 39% Easy
347 Top K Frequent Elements 50% Medium
349 Intersection of Two Arrays 48% Easy
350 Intersection of Two Arrays II 44% Easy
352 Data Stream as Disjoint Intervals 41% Hard
354 Russian Doll Envelopes 32% Hard
355 Design Twitter 25% Medium
357 Count Numbers with Unique Digits 46% Medium
363 Max Sum of Rectangle No Larger Than K 33% Hard
365 Water and Jug Problem 28% Medium
367 Valid Perfect Square 38% Easy
368 Largest Divisible Subset 33% Medium
371 Sum of Two Integers 50% Easy
372 Super Pow 34% Medium
373 Find K Pairs with Smallest Sums 31% Medium
375 Guess Number Higher or Lower II 36% Medium
376 Wiggle Subsequence 36% Medium
377 Combination Sum IV 43% Medium
378 Kth Smallest Element in a Sorted Matrix 45% Medium
380 Insert Delete GetRandom O(1) 40% Medium
381 Insert Delete GetRandom O(1) - Duplicates allowed 29% Hard
382 Linked List Random Node 47% Medium
383 Ransom Note 48% Easy
384 Shuffle an Array 47% Medium
385 Mini Parser 30% Medium
387 First Unique Character in a String 47% Easy
388 Longest Absolute File Path 37% Medium
389 Find the Difference 51% Easy
390 Elimination Game 42% Medium
391 Perfect Rectangle 27% Hard
392 Is Subsequence 44% Medium
393 UTF-8 Validation 34% Medium
394 Decode String 42% Medium
395 Longest Substring with At Least K Repeating Characters 35% Medium
396 Rotate Function 34% Medium
397 Integer Replacement 30% Medium
398 Random Pick Index 45% Medium
399 Evaluate Division 42% Medium
400 Nth Digit 29% Easy
401 Binary Watch 44% Easy
402 Remove K Digits 25% Medium
403 Frog Jump 32% Hard
404 Sum of Left Leaves 47% Easy
405 Convert a Number to Hexadecimal 41% Easy
406 Queue Reconstruction by Height 56% Medium
407 Trapping Rain Water II 37% Hard
409 Longest Palindrome 46% Easy
410 Split Array Largest Sum 39% Hard
412 Fizz Buzz 57% Easy
413 Arithmetic Slices 54% Medium
414 Third Maximum Number 28% Easy
415 Add Strings 41% Easy
416 Partition Equal Subset Sum 38% Medium
417 Pacific Atlantic Water Flow 35% Medium
419 Battleships in a Board 63% Medium
420 Strong Password Checker 19% Hard
421 Maximum XOR of Two Numbers in an Array 48% Medium
423 Reconstruct Original Digits from English 44% Medium
424 Longest Repeating Character Replacement 42% Medium
432 All O`one Data Structure 27% Hard
433 * Minimum Genetic Mutation 35% Medium
434 Number of Segments in a String 36% Easy
435 Non-overlapping Intervals 41% Medium
436 Find Right Interval 41% Medium
437 Path Sum III 40% Easy
438 Find All Anagrams in a String 34% Easy
440 K-th Smallest in Lexicographical Order 25% Hard
441 Arranging Coins 36% Easy
442 Find All Duplicates in an Array 57% Medium
443 String Compression 35% Easy
445 Add Two Numbers II 46% Medium
446 Arithmetic Slices II - Subsequence 27% Hard
447 Number of Boomerangs 47% Easy
448 Find All Numbers Disappeared in an Array 51% Easy
450 Delete Node in a BST 37% Medium
451 Sort Characters By Frequency 52% Medium
452 Minimum Number of Arrows to Burst Balloons 44% Medium
453 Minimum Moves to Equal Array Elements 48% Easy
454 4Sum II 47% Medium
455 Assign Cookies 47% Easy
456 132 Pattern 27% Medium
457 * Circular Array Loop 22% Medium
458 * Poor Pigs 42% Easy
459 Repeated Substring Pattern 38% Easy
460 LFU Cache 25% Hard
461 Hamming Distance 69% Easy
462 Minimum Moves to Equal Array Elements II 51% Medium
463 Island Perimeter 58% Easy
464 Can I Win 25% Medium
466 Count The Repetitions 27% Hard
467 Unique Substrings in Wraparound String 33% Medium
468 Validate IP Address 20% Medium
472 Concatenated Words 31% Hard
473 Matchsticks to Square 35% Medium
474 Ones and Zeroes 38% Medium
475 Heaters 29% Easy
476 Number Complement 61% Easy
477 Total Hamming Distance 47% Medium
479 Largest Palindrome Product 25% Easy
480 Sliding Window Median 30% Hard
481 Magical String 45% Medium
482 License Key Formatting 39% Easy
483 Smallest Good Base 34% Hard
485 Max Consecutive Ones 53% Easy
486 Predict the Winner 45% Medium
488 Zuma Game 36% Hard
491 Increasing Subsequences 39% Medium
492 Construct the Rectangle 48% Easy
493 Reverse Pairs 20% Hard
494 Target Sum 43% Medium
495 Teemo Attacking 51% Medium
496 Next Greater Element I 56% Easy
498 Diagonal Traverse 44% Medium
500 Keyboard Row 60% Easy
501 Find Mode in Binary Search Tree 37% Easy
502 IPO 36% Hard
503 Next Greater Element II 48% Medium
504 Base 7 43% Easy
506 Relative Ranks 47% Easy
507 Perfect Number 32% Easy
508 Most Frequent Subtree Sum 52% Medium
513 Find Bottom Left Tree Value 56% Medium
514 Freedom Trail 39% Hard
515 Find Largest Value in Each Tree Row 55% Medium
516 Longest Palindromic Subsequence 43% Medium
517 Super Washing Machines 36% Hard
518 * Coin Change 2 36% Medium
520 Detect Capital 51% Easy
521 Longest Uncommon Subsequence I 55% Easy
522 Longest Uncommon Subsequence II 32% Medium
523 Continuous Subarray Sum 23% Medium
524 Longest Word in Dictionary through Deleting 43% Medium
525 Contiguous Array 41% Medium
526 Beautiful Arrangement 53% Medium
529 Minesweeper 49% Medium
530 Minimum Absolute Difference in BST 47% Easy
532 K-diff Pairs in an Array 28% Easy
537 Complex Number Multiplication 64% Medium
538 Convert BST to Greater Tree 48% Easy
539 Minimum Time Difference 46% Medium
540 Single Element in a Sorted Array 56% Medium
541 Reverse String II 44% Easy
542 01 Matrix 33% Medium
543 Diameter of Binary Tree 45% Easy
546 Remove Boxes 36% Hard
547 Friend Circles 49% Medium
551 Student Attendance Record I 44% Easy
552 Student Attendance Record II 31% Hard
553 Optimal Division 55% Medium
554 Brick Wall 46% Medium
556 Next Greater Element III 28% Medium
557 Reverse Words in a String III 60% Easy
560 Subarray Sum Equals K 39% Medium
561 Array Partition I 66% Easy
563 Binary Tree Tilt 46% Easy
564 Find the Closest Palindrome 16% Hard
565 Array Nesting 49% Medium
566 Reshape the Matrix 57% Easy
567 Permutation in String 36% Medium
572 Subtree of Another Tree 40% Easy
575 Distribute Candies 58% Easy
576 Out of Boundary Paths 30% Medium
581 Shortest Unsorted Continuous Subarray 29% Easy
583 Delete Operation for Two Strings 44% Medium
587 Erect the Fence 33% Hard
591 Tag Validator 31% Hard
592 Fraction Addition and Subtraction 46% Medium
593 Valid Square 39% Medium
594 Longest Harmonious Subsequence 41% Easy
598 Range Addition II 48% Easy
599 Minimum Index Sum of Two Lists 46% Easy
600 Non-negative Integers without Consecutive Ones 31% Hard
605 Can Place Flowers 30% Easy
606 Construct String from Binary Tree 50% Easy
609 Find Duplicate File in System 52% Medium
611 Valid Triangle Number 42% Medium
617 Merge Two Binary Trees 67% Easy
621 Task Scheduler 42% Medium
622 * Design Circular Queue 52% Easy
623 Add One Row to Tree 46% Medium
628 Maximum Product of Three Numbers 44% Easy
629 K Inverse Pairs Array 27% Hard
630 Course Schedule III 29% Hard
632 Smallest Range 42% Hard
633 Sum of Square Numbers 32% Easy
636 Exclusive Time of Functions 44% Medium
637 Average of Levels in Binary Tree 56% Easy
638 Shopping Offers 45% Medium
639 Decode Ways II 24% Hard
640 Solve the Equation 38% Medium
641 * Design Circular Deque 48% Easy
643 Maximum Average Subarray I 37% Easy
645 Set Mismatch 39% Easy
646 Maximum Length of Pair Chain 47% Medium
647 Palindromic Substrings 54% Medium
648 Replace Words 48% Medium
649 Dota2 Senate 36% Medium
650 2 Keys Keyboard 45% Medium
652 Find Duplicate Subtrees 37% Medium
653 Two Sum IV - Input is a BST 50% Easy
654 Maximum Binary Tree 70% Medium
655 Print Binary Tree 48% Medium
657 Judge Route Circle 68% Easy
658 Find K Closest Elements 34% Medium
659 Split Array into Consecutive Subsequences 37% Medium
661 Image Smoother 46% Easy
662 Maximum Width of Binary Tree 38% Medium
664 Strange Printer 34% Hard
665 Non-decreasing Array 19% Easy
667 Beautiful Arrangement II 50% Medium
668 Kth Smallest Number in Multiplication Table 40% Hard
669 Trim a Binary Search Tree 58% Easy
670 Maximum Swap 38% Medium
671 Second Minimum Node In a Binary Tree 42% Easy
672 Bulb Switcher II 49% Medium
673 Number of Longest Increasing Subsequence 31% Medium
674 Longest Continuous Increasing Subsequence 42% Easy
675 Cut Off Trees for Golf Event 26% Hard
676 Implement Magic Dictionary 49% Medium
677 Map Sum Pairs 51% Medium
678 Valid Parenthesis String 29% Medium
679 24 Game 38% Hard
680 Valid Palindrome II 32% Easy
682 Baseball Game 58% Easy
684 Redundant Connection 44% Medium
685 Redundant Connection II 27% Hard
686 Repeated String Match 31% Easy
687 Longest Univalue Path 32% Easy
688 Knight Probability in Chessboard 40% Medium
689 Maximum Sum of 3 Non-Overlapping Subarrays 41% Hard
691 Stickers to Spell Word 35% Hard
692 Top K Frequent Words 41% Medium
693 Binary Number with Alternating Bits 56% Easy
695 Max Area of Island 52% Easy
696 Count Binary Substrings 51% Easy
697 Degree of an Array 46% Easy
698 Partition to K Equal Sum Subsets 38% Medium
699 Falling Squares 38% Hard
700 * Search in a Binary Search Tree 1% Easy
701 * Insert into a Binary Search Tree 0% Medium
703 * Kth Largest Element in a Stream 0% Easy
704 * Binary Search 0% Easy
705 * Design HashSet 0% Easy
706 * Design HashMap 0% Easy
707 * Design Linked List 0% Easy
709 * To Lower Case 78% Easy
710 * Random Pick with Blacklist 30% Hard
712 Minimum ASCII Delete Sum for Two Strings 51% Medium
713 Subarray Product Less Than K 33% Medium
714 Best Time to Buy and Sell Stock with Transaction Fee 46% Medium
715 Range Module 30% Hard
717 1-bit and 2-bit Characters 49% Easy
718 Maximum Length of Repeated Subarray 41% Medium
719 Find K-th Smallest Pair Distance 27% Hard
720 Longest Word in Dictionary 41% Easy
721 Accounts Merge 34% Medium
722 Remove Comments 28% Medium
724 Find Pivot Index 39% Easy
725 Split Linked List in Parts 47% Medium
726 Number of Atoms 43% Hard
728 Self Dividing Numbers 67% Easy
729 My Calendar I 42% Medium
730 Count Different Palindromic Subsequences 35% Hard
731 My Calendar II 38% Medium
732 My Calendar III 49% Hard
733 Flood Fill 47% Easy
735 Asteroid Collision 37% Medium
736 Parse Lisp Expression 41% Hard
738 Monotone Increasing Digits 41% Medium
739 Daily Temperatures 53% Medium
740 Delete and Earn 44% Medium
741 Cherry Pickup 24% Hard
743 Network Delay Time 36% Medium
744 Find Smallest Letter Greater Than Target 43% Easy
745 Prefix and Suffix Search 26% Hard
746 Min Cost Climbing Stairs 43% Easy
747 Largest Number At Least Twice of Others 40% Easy
748 Shortest Completing Word 52% Medium
749 Contain Virus 40% Hard
752 Open the Lock 40% Medium
753 Cracking the Safe 41% Hard
754 Reach a Number 27% Medium
756 Pyramid Transition Matrix 47% Medium
757 Set Intersection Size At Least Two 34% Hard
761 Special Binary String 43% Hard
762 Prime Number of Set Bits in Binary Representation 55% Easy
763 Partition Labels 64% Medium
764 Largest Plus Sign 39% Medium
765 Couples Holding Hands 48% Hard
766 Toeplitz Matrix 58% Easy
767 Reorganize String 36% Medium
768 Max Chunks To Make Sorted II 43% Hard
769 Max Chunks To Make Sorted 48% Medium
770 Basic Calculator IV 42% Hard
771 Jewels and Stones 81% Easy
773 Sliding Puzzle 46% Hard
775 Global and Local Inversions 34% Medium
777 Swap Adjacent in LR String 29% Medium
778 Swim in Rising Water 44% Hard
779 K-th Symbol in Grammar 37% Medium
780 Reaching Points 24% Hard
781 Rabbits in Forest 49% Medium
782 Transform to Chessboard 37% Hard
783 Minimum Distance Between BST Nodes 47% Easy
784 Letter Case Permutation 53% Easy
785 Is Graph Bipartite? 38% Medium
786 K-th Smallest Prime Fraction 32% Hard
787 Cheapest Flights Within K Stops 29% Medium
788 Rotated Digits 51% Easy
789 Escape The Ghosts 51% Medium
790 Domino and Tromino Tiling 33% Medium
791 Custom Sort String 59% Medium
792 Number of Matching Subsequences 36% Medium
793 Preimage Size of Factorial Zeroes Function 41% Hard
794 Valid Tic-Tac-Toe State 27% Medium
795 Number of Subarrays with Bounded Maximum 41% Medium
796 Rotate String 50% Easy
797 All Paths From Source to Target 67% Medium
798 Smallest Rotation with Highest Score 33% Hard
799 Champagne Tower 29% Medium
801 Minimum Swaps To Make Sequences Increasing 29% Medium
802 Find Eventual Safe States 38% Medium
803 Bricks Falling When Hit 22% Hard
804 Unique Morse Code Words 72% Easy
805 Split Array With Same Average 20% Hard
806 Number of Lines To Write String 62% Easy
807 Max Increase to Keep City Skyline 79% Medium
808 Soup Servings 33% Medium
809 Expressive Words 37% Medium
810 Chalkboard XOR Game 39% Hard
811 Subdomain Visit Count 61% Easy
812 Largest Triangle Area 53% Easy
813 Largest Sum of Averages 40% Medium
814 Binary Tree Pruning 68% Medium
815 Bus Routes 32% Hard
816 Ambiguous Coordinates 42% Medium
817 Linked List Components 50% Medium
818 Race Car 27% Hard
819 Most Common Word 48% Easy
820 Short Encoding of Words 42% Medium
821 Shortest Distance to a Character 60% Easy
822 Card Flipping Game 35% Medium
823 Binary Trees With Factors 29% Medium
824 Goat Latin 55% Easy
825 Friends Of Appropriate Ages 29% Medium
826 Most Profit Assigning Work 32% Medium
827 Making A Large Island 40% Hard
828 Unique Letter String 34% Hard
829 Consecutive Numbers Sum 26% Medium
830 Positions of Large Groups 46% Easy
831 Masking Personal Information 42% Medium
832 Flipping an Image 69% Easy
833 Find And Replace in String 38% Medium
834 Sum of Distances in Tree 32% Hard
835 Image Overlap 38% Medium
836 Rectangle Overlap 41% Easy
837 New 21 Game 25% Medium
838 Push Dominoes 40% Medium
839 Similar String Groups 33% Hard
840 Magic Squares In Grid 34% Easy
841 Keys and Rooms 57% Medium
842 Split Array into Fibonacci Sequence 34% Medium
843 Guess the Word 34% Hard
844 Backspace String Compare 46% Easy
845 Longest Mountain in Array 31% Medium
846 Hand of Straights 42% Medium
847 Shortest Path Visiting All Nodes 39% Hard
848 Shifting Letters 34% Medium
849 Maximize Distance to Closest Person 38% Easy
850 Rectangle Area II 42% Hard
851 Loud and Rich 42% Medium
852 Peak Index in a Mountain Array 68% Easy
853 Car Fleet 30% Medium
854 K-Similar Strings 29% Hard
855 * Exam Room 29% Medium
856 Score of Parentheses 55% Medium
857 * Minimum Cost to Hire K Workers 37% Hard
858 Mirror Reflection 47% Medium
859 Buddy Strings 26% Easy
860 * Lemonade Change 49% Easy
861 * Score After Flipping Matrix 68% Medium
862 * Shortest Subarray with Sum at Least K 16% Hard
863 * All Nodes Distance K in Binary Tree 39% Medium
864 * Shortest Path to Get All Keys 🆕 31% Hard
865 * Smallest Subtree with all the Deepest Nodes 🆕 47% Medium
866 * Prime Palindrome 🆕 16% Medium
867 * Transpose Matrix 🆕 68% Easy

以下免费的算法题,暂时不能使用 Go 解答

helper

helper 会处理大部分琐碎的工作。

notes

notes 记录了我答题过程中,对知识点的总结。

kit

针对 LeetCode 中经常出现的以下数据结构,在 kit 中进行了定义,并添加了与 []int 相互转换的函数。利用 Go 1.9 新添加的 type alias 功能,易于添加单元测试。

About

🎓 Go Solution for LeetCode algorithm problems, 100% coverage, continually updating.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%