Skip to content

Latest commit

 

History

History
388 lines (384 loc) · 62.5 KB

File metadata and controls

388 lines (384 loc) · 62.5 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
601 Human Traffic of Stadium MySQL Hard
602 Friend Requests II: Who Has the Most Friends 🔒 MySQL Medium
603 Consecutive Available Seats 🔒 MySQL Easy
604 Design Compressed String Iterator 🔒 Go Easy
605 Can Place Flowers Go Easy
606 Construct String from Binary Tree Go Easy
607 Sales Person 🔒 MySQL Easy
608 Tree Node 🔒 MySQL Medium
609 Find Duplicate File in System Go Medium
610 Triangle Judgement 🔒 MySQL Easy
611 Valid Triangle Number Go Medium
612 Shortest Distance in a Plane 🔒 MySQL Medium
613 Shortest Distance in a Line 🔒 MySQL Easy
614 Second Degree Follower 🔒 MySQL Medium
615 Average Salary: Departments VS Company 🔒 MySQL Hard
616 Add Bold Tag in String 🔒 Go Medium
617 Merge Two Binary Trees Go Easy
618 Students Report By Geography 🔒 MySQL Hard
619 Biggest Single Number 🔒 MySQL Easy
620 Not Boring Movies MySQL Easy
621 Task Scheduler Go Medium
622 Design Circular Queue Go Medium
623 Add One Row to Tree Go Medium
624 Maximum Distance in Arrays 🔒 Go Medium
625 Minimum Factorization 🔒 Go Medium
626 Exchange Seats MySQL Medium
627 Swap Salary MySQL Easy
628 Maximum Product of Three Numbers Go Easy
629 K Inverse Pairs Array Go Hard
630 Course Schedule III Go Hard
631 Design Excel Sum Formula 🔒 Go Hard
632 Smallest Range Covering Elements from K Lists Go Hard
633 Sum of Square Numbers Go Medium
634 Find the Derangement of An Array 🔒 Go Medium
635 Design Log Storage System 🔒 Go Medium
636 Exclusive Time of Functions Go Medium
637 Average of Levels in Binary Tree Go Easy
638 Shopping Offers Go Medium
639 Decode Ways II Go Hard
640 Solve the Equation Go Medium
641 Design Circular Deque Go Medium
642 Design Search Autocomplete System 🔒 Go Hard
643 Maximum Average Subarray I Go Easy
644 Maximum Average Subarray II 🔒 Go Hard
645 Set Mismatch Go Easy
646 Maximum Length of Pair Chain Go Medium
647 Palindromic Substrings Go Medium
648 Replace Words Go Medium
649 Dota2 Senate Go Medium
650 2 Keys Keyboard Go Medium
651 4 Keys Keyboard 🔒 Go Medium
652 Find Duplicate Subtrees Go Medium
653 Two Sum IV - Input is a BST Go Easy
654 Maximum Binary Tree Go Medium
655 Print Binary Tree Go Medium
656 Coin Path 🔒 Go Hard
657 Robot Return to Origin Go Easy
658 Find K Closest Elements Go Medium
659 Split Array into Consecutive Subsequences Go Medium
660 Remove 9 🔒 Go Hard
661 Image Smoother Go Easy
662 Maximum Width of Binary Tree Go Medium
663 Equal Tree Partition 🔒 Go Medium
664 Strange Printer Go Hard
665 Non-decreasing Array Go Medium
666 Path Sum IV 🔒 Go Medium
667 Beautiful Arrangement II Go Medium
668 Kth Smallest Number in Multiplication Table Go Hard
669 Trim a Binary Search Tree Go Medium
670 Maximum Swap Go Medium
671 Second Minimum Node In a Binary Tree Go Easy
672 Bulb Switcher II Go Medium
673 Number of Longest Increasing Subsequence Go Medium
674 Longest Continuous Increasing Subsequence Go Easy
675 Cut Off Trees for Golf Event Go Hard
676 Implement Magic Dictionary Go Medium
677 Map Sum Pairs Go Medium
678 Valid Parenthesis String Go Medium
679 24 Game Go Hard
680 Valid Palindrome II Go Easy
681 Next Closest Time 🔒 Go Medium
682 Baseball Game Go Easy
683 K Empty Slots 🔒 Go Hard
684 Redundant Connection Go Medium
685 Redundant Connection II Go Hard
686 Repeated String Match Go Medium
687 Longest Univalue Path Go Medium
688 Knight Probability in Chessboard Go Medium
689 Maximum Sum of 3 Non-Overlapping Subarrays Go Hard
690 Employee Importance Go Medium
691 Stickers to Spell Word Go Hard
692 Top K Frequent Words Go Medium
693 Binary Number with Alternating Bits Go Easy
694 Number of Distinct Islands 🔒 Go Medium
695 Max Area of Island Go Medium
696 Count Binary Substrings Go Easy
697 Degree of an Array Go Easy
698 Partition to K Equal Sum Subsets Go Medium
699 Falling Squares Go Hard
700 Search in a Binary Search Tree Go Easy
701 Insert into a Binary Search Tree Go Medium
702 Search in a Sorted Array of Unknown Size 🔒 Go Medium
703 Kth Largest Element in a Stream Go Easy
704 Binary Search Go Easy
705 Design HashSet Go Easy
706 Design HashMap Go Easy
707 Design Linked List Go Medium
708 Insert into a Sorted Circular Linked List 🔒 Go Medium
709 To Lower Case Go Easy
710 Random Pick with Blacklist Go Hard
711 Number of Distinct Islands II 🔒 Go Hard
712 Minimum ASCII Delete Sum for Two Strings Go Medium
713 Subarray Product Less Than K Go Medium
714 Best Time to Buy and Sell Stock with Transaction Fee Go Medium
715 Range Module Go Hard
716 Max Stack 🔒 Go Easy
717 1-bit and 2-bit Characters Go Easy
718 Maximum Length of Repeated Subarray Go Medium
719 Find K-th Smallest Pair Distance Go Hard
720 Longest Word in Dictionary Go Medium
721 Accounts Merge Go Medium
722 Remove Comments Go Medium
723 Candy Crush 🔒 Go Medium
724 Find Pivot Index Go Easy
725 Split Linked List in Parts Go Medium
726 Number of Atoms Go Hard
727 Minimum Window Subsequence 🔒 Go Hard
728 Self Dividing Numbers Go Easy
729 My Calendar I Go Medium
730 Count Different Palindromic Subsequences Go Hard
731 My Calendar II Go Medium
732 My Calendar III Go Hard
733 Flood Fill Go Easy
734 Sentence Similarity 🔒 Go Easy
735 Asteroid Collision Go Medium
736 Parse Lisp Expression Go Hard
737 Sentence Similarity II 🔒 Go Medium
738 Monotone Increasing Digits Go Medium
739 Daily Temperatures Go Medium
740 Delete and Earn Go Medium
741 Cherry Pickup Go Hard
742 Closest Leaf in a Binary Tree 🔒 Go Medium
743 Network Delay Time Go Medium
744 Find Smallest Letter Greater Than Target Go Easy
745 Prefix and Suffix Search Go Hard
746 Min Cost Climbing Stairs Go Easy
747 Largest Number At Least Twice of Others Go Easy
748 Shortest Completing Word Go Easy
749 Contain Virus Go Hard
750 Number Of Corner Rectangles 🔒 Go Medium
751 IP to CIDR 🔒 Go Medium
752 Open the Lock Go Medium
753 Cracking the Safe Go Hard
754 Reach a Number Go Medium
755 Pour Water 🔒 Go Medium
756 Pyramid Transition Matrix Go Medium
757 Set Intersection Size At Least Two Go Hard
758 Bold Words in String 🔒 Go Medium
759 Employee Free Time 🔒 Go Hard
760 Find Anagram Mappings 🔒 Go Easy
761 Special Binary String Go Hard
762 Prime Number of Set Bits in Binary Representation Go Easy
763 Partition Labels Go Medium
764 Largest Plus Sign Go Medium
765 Couples Holding Hands Go Hard
766 Toeplitz Matrix Go Easy
767 Reorganize String Go Medium
768 Max Chunks To Make Sorted II Go Hard
769 Max Chunks To Make Sorted Go Medium
770 Basic Calculator IV Go Hard
771 Jewels and Stones Go Easy
772 Basic Calculator III 🔒 Go Hard
773 Sliding Puzzle Go Hard
774 Minimize Max Distance to Gas Station 🔒 Go Hard
775 Global and Local Inversions Go Medium
776 Split BST 🔒 Go Medium
777 Swap Adjacent in LR String Go Medium
778 Swim in Rising Water Go Hard
779 K-th Symbol in Grammar Go Medium
780 Reaching Points Go Hard
781 Rabbits in Forest Go Medium
782 Transform to Chessboard Go Hard
783 Minimum Distance Between BST Nodes Go Easy
784 Letter Case Permutation Go Medium
785 Is Graph Bipartite? Go Medium
786 K-th Smallest Prime Fraction Go Hard
787 Cheapest Flights Within K Stops Go Medium
788 Rotated Digits Go Medium
789 Escape The Ghosts Go Medium
790 Domino and Tromino Tiling Go Medium
791 Custom Sort String Go Medium
792 Number of Matching Subsequences Go Medium
793 Preimage Size of Factorial Zeroes Function Go Hard
794 Valid Tic-Tac-Toe State Go Medium
795 Number of Subarrays with Bounded Maximum Go Medium
796 Rotate String Go Easy
797 All Paths From Source to Target Go Medium
798 Smallest Rotation with Highest Score Go Hard
799 Champagne Tower Go Medium
800 Similar RGB Color 🔒 Go Easy
801 Minimum Swaps To Make Sequences Increasing Go Hard
802 Find Eventual Safe States Go Medium
803 Bricks Falling When Hit Go Hard
804 Unique Morse Code Words Go Easy
805 Split Array With Same Average Go Hard
806 Number of Lines To Write String Go Easy
807 Max Increase to Keep City Skyline Go Medium
808 Soup Servings Go Medium
809 Expressive Words Go Medium
810 Chalkboard XOR Game Go Hard
811 Subdomain Visit Count Go Medium
812 Largest Triangle Area Go Easy
813 Largest Sum of Averages Go Medium
814 Binary Tree Pruning Go Medium
815 Bus Routes Go Hard
816 Ambiguous Coordinates Go Medium
817 Linked List Components Go Medium
818 Race Car Go Hard
819 Most Common Word Go Easy
820 Short Encoding of Words Go Medium
821 Shortest Distance to a Character Go Easy
822 Card Flipping Game Go Medium
823 Binary Trees With Factors Go Medium
824 Goat Latin Go Easy
825 Friends Of Appropriate Ages Go Medium
826 Most Profit Assigning Work Go Medium
827 Making A Large Island Go Hard
828 Count Unique Characters of All Substrings of a Given String Go Hard
829 Consecutive Numbers Sum Go Hard
830 Positions of Large Groups Go Easy
831 Masking Personal Information Go Medium
832 Flipping an Image Go Easy
833 Find And Replace in String Go Medium
834 Sum of Distances in Tree Go Hard
835 Image Overlap Go Medium
836 Rectangle Overlap Go Easy
837 New 21 Game Go Medium
838 Push Dominoes Go Medium
839 Similar String Groups Go Hard
840 Magic Squares In Grid Go Medium
841 Keys and Rooms Go Medium
842 Split Array into Fibonacci Sequence Go Medium
843 Guess the Word Go Hard
844 Backspace String Compare Go Easy
845 Longest Mountain in Array Go Medium
846 Hand of Straights Go Medium
847 Shortest Path Visiting All Nodes Go Hard
848 Shifting Letters Go Medium
849 Maximize Distance to Closest Person Go Medium
850 Rectangle Area II Go Hard
851 Loud and Rich Go Medium
852 Peak Index in a Mountain Array Go Easy
853 Car Fleet Go Medium
854 K-Similar Strings Go Hard
855 Exam Room Go Medium
856 Score of Parentheses Go Medium
857 Minimum Cost to Hire K Workers Go Hard
858 Mirror Reflection Go Medium
859 Buddy Strings Go Easy
860 Lemonade Change Go Easy
861 Score After Flipping Matrix Go Medium
862 Shortest Subarray with Sum at Least K Go Hard
863 All Nodes Distance K in Binary Tree Go Medium
864 Shortest Path to Get All Keys Go Hard
865 Smallest Subtree with all the Deepest Nodes Go Medium
866 Prime Palindrome Go Medium
867 Transpose Matrix Go Easy
868 Binary Gap Go Easy
869 Reordered Power of 2 Go Medium
870 Advantage Shuffle Go Medium
871 Minimum Number of Refueling Stops Go Hard
872 Leaf-Similar Trees Go Easy
873 Length of Longest Fibonacci Subsequence Go Medium
874 Walking Robot Simulation Go Medium
875 Koko Eating Bananas Go Medium
876 Middle of the Linked List Go Easy
877 Stone Game Go Medium
878 Nth Magical Number Go Hard
879 Profitable Schemes Go Hard
880 Decoded String at Index Go Medium
881 Boats to Save People Go Medium
882 Reachable Nodes In Subdivided Graph Go Hard
883 Projection Area of 3D Shapes Go Easy
884 Uncommon Words from Two Sentences Go Easy
885 Spiral Matrix III Go Medium
886 Possible Bipartition Go Medium
887 Super Egg Drop Go Hard
888 Fair Candy Swap Go Easy
889 Construct Binary Tree from Preorder and Postorder Traversal Go Medium
890 Find and Replace Pattern Go Medium
891 Sum of Subsequence Widths Go Hard
892 Surface Area of 3D Shapes Go Easy
893 Groups of Special-Equivalent Strings Go Medium
894 All Possible Full Binary Trees Go Medium
895 Maximum Frequency Stack Go Hard
896 Monotonic Array Go Easy
897 Increasing Order Search Tree Go Easy
898 Bitwise ORs of Subarrays Go Medium
899 Orderly Queue Go Hard
900 RLE Iterator Go Medium