/leetcode

Primary LanguageGoMIT LicenseMIT

2020 Leetcode exercises (111 solved)

Title Leetcode My Solution
3sum [Link] [Link]
4sum ii [Link] [Link]
Accounts merge [Link] [Link]
Add and search word data structure design [Link] [Link]
Add strings [Link] [Link]
Alien dictionary [Link] [Link]
Basic calculator ii [Link] [Link]
Best time to buy and sell stock [Link] [Link]
Binary search tree iterator [Link] [Link]
Binary tree inorder traversal [Link] [Link]
Binary tree level order traversal [Link] [Link]
Binary tree maximum path sum [Link] [Link]
Binary tree right side view [Link] [Link]
Climbing stairs [Link] [Link]
Clone graph [Link] [Link]
Coin change [Link] [Link]
Combination sum iv [Link] [Link]
Construct binary tree from preorder and inorder traversal [Link] [Link]
Container with most water [Link] [Link]
Contains duplicate [Link] [Link]
Continuous subarray sum [Link] [Link]
Convert sorted array to binary search tree [Link] [Link]
Counting bits [Link] [Link]
Course schedule [Link] [Link]
Course schedule ii [Link] [Link]
Decode ways [Link] [Link]
Delete operation for two strings [Link] [Link]
Edit distance [Link] [Link]
Excel sheet column number [Link] [Link]
Exclusive time of functions [Link] [Link]
Find all anagrams in a string [Link] [Link]
Find median from data stream [Link] [Link]
Find minimum in rotated sorted array [Link] [Link]
First missing positive [Link] [Link]
Fizz buzz [Link] [Link]
Gas station [Link] [Link]
Group anagrams [Link] [Link]
Group shifted strings [Link] [Link]
House robber [Link] [Link]
House robber ii [Link] [Link]
Implement trie prefix tree [Link] [Link]
Insert interval [Link] [Link]
Integer to english words [Link] [Link]
Interval list intersections [Link] [Link]
Invert binary tree [Link] [Link]
Is graph bipartite [Link] [Link]
Jump game [Link] [Link]
K closest points to origin [Link] [Link]
Kth smallest element in a bst [Link] [Link]
Linked list cycle [Link] [Link]
Longest common subsequence [Link] [Link]
Longest consecutive sequence [Link] [Link]
Longest palindromic substring [Link] [Link]
Longest repeating character replacement [Link] [Link]
Longest substring with at least k repeating characters [Link] [Link]
Longest substring without repeating characters [Link] [Link]
Lowest common ancestor of a binary search tree [Link] [Link]
Lru cache [Link] [Link]
Maximum depth of binary tree [Link] [Link]
Maximum product subarray [Link] [Link]
Maximum subarray [Link] [Link]
Maximum swap [Link] [Link]
Merge intervals [Link] [Link]
Merge k sorted lists [Link] [Link]
Merge two sorted lists [Link] [Link]
Minimum remove to make valid parentheses [Link] [Link]
Minimum window substring [Link] [Link]
Missing element in sorted array [Link] [Link]
Missing number [Link] [Link]
Next permutation [Link] [Link]
Non overlapping intervals [Link] [Link]
Number of 1 bits [Link] [Link]
Number of islands [Link] [Link]
Odd even linked list [Link] [Link]
Palindromic substrings [Link] [Link]
Permutation in string [Link] [Link]
Permutations ii [Link] [Link]
Powx n [Link] [Link]
Product of array except self [Link] [Link]
Random pick with weight [Link] [Link]
Remove invalid parentheses [Link] [Link]
Remove nth node from end of list [Link] [Link]
Reorder list [Link] [Link]
Reverse bits [Link] [Link]
Reverse linked list [Link] [Link]
Rotate image [Link] [Link]
Same tree [Link] [Link]
Search in rotated sorted array [Link] [Link]
Serialize and deserialize binary tree [Link] [Link]
Set matrix zeroes [Link] [Link]
Spiral matrix [Link] [Link]
Sqrtx [Link] [Link]
Subarray sum equals k [Link] [Link]
Subsets [Link] [Link]
Subtree of another tree [Link] [Link]
Sudoku solver [Link] [Link]
Sum of two integers [Link] [Link]
Surrounded regions [Link] [Link]
Top k frequent elements [Link] [Link]
Trapping rain water [Link] [Link]
Unique paths [Link] [Link]
Valid anagram [Link] [Link]
Valid palindrome [Link] [Link]
Valid parentheses [Link] [Link]
Valid sudoku [Link] [Link]
Validate binary search tree [Link] [Link]
Vertical order traversal of a binary tree [Link] [Link]
Word break [Link] [Link]
Word break ii [Link] [Link]
Word search [Link] [Link]
Word search ii [Link] [Link]

2018 Leetcode exercises (180 solved)

Title Leetcode My Solution
3sum [Link] [Link]
Add binary [Link] [Link]
Add two numbers [Link] [Link]
Atoi [Link] [Link]
Baseball game [Link] [Link]
Basic calculator [Link] [Link]
Best time to buy and sell stock [Link] [Link]
Best time to buy and sell stock with cooldown [Link] [Link]
Binary tree level order traversal [Link] [Link]
Binary tree right side view [Link] [Link]
Binary tree upside down [Link] [Link]
Binary tree zigzag level order traversal [Link] [Link]
Buddy strings [Link] [Link]
Burst balloons [Link] [Link]
Can i win [Link] [Link]
Can place flowers [Link] [Link]
Copy list with random pointer [Link] [Link]
Count and say [Link] [Link]
Count of smaller numbers after self [Link] [Link]
Count primes [Link] [Link]
Count_bits [Link] [Link]
Daily temperatures [Link] [Link]
Decode ways [Link] [Link]
Delete node in a linked list [Link] [Link]
Dungeon game [Link] [Link]
Evaluate reverse polish notation [Link] [Link]
Excel sheet column title [Link] [Link]
Explore [Link] [Link]
Factor combinations [Link] [Link]
Find anagram mappings [Link] [Link]
Find largest value in each tree row [Link] [Link]
Find leaves of binary tree [Link] [Link]
Find peak element [Link] [Link]
Find_all_numbers_disappeared_in_an_array [Link] [Link]
First bad version [Link] [Link]
First unique character in a string [Link] [Link]
Fraction to recurring decimal [Link] [Link]
Friend circles [Link] [Link]
Game of life [Link] [Link]
Generate parentheses [Link] [Link]
Gray code [Link] [Link]
Group anagrams [Link] [Link]
Guess number higher or lower [Link] [Link]
Hamming_distance [Link] [Link]
House robber [Link] [Link]
Implement strstr [Link] [Link]
Implement trie prefix tree [Link] [Link]
Insert delete getrandom o1 [Link] [Link]
Insert interval [Link] [Link]
Integer to english words [Link] [Link]
Intersection of two linked lists [Link] [Link]
Island_perimeter [Link] [Link]
Isomorphic strings [Link] [Link]
Jewels and stones [Link] [Link]
Kth largest element in an array [Link] [Link]
Largest time for given digits [Link] [Link]
Length of last word [Link] [Link]
Letter combinations of a phone number [Link] [Link]
License key formatting [Link] [Link]
Linked list cycle [Link] [Link]
Linked_list_cycle_ii [Link] [Link]
Longest common prefix [Link] [Link]
Longest palindromic substring [Link] [Link]
Longest substring without repeating characters [Link] [Link]
Longest univalue path [Link] [Link]
Longest_absolute_file_path [Link] [Link]
Longest_consecutive_sequence [Link] [Link]
Lowest common ancestor of a binary search tree [Link] [Link]
Lowest common ancestor of a binary tree [Link] [Link]
Lru cache [Link] [Link]
Majority_element [Link] [Link]
Max points on a line [Link] [Link]
Maximal rectangle [Link] [Link]
Maximum depth of binary tree [Link] [Link]
Maximum product subarray [Link] [Link]
Maximum subarray [Link] [Link]
Maximum xor of two numbers in an array [Link] [Link]
Meeting rooms ii [Link] [Link]
Merge intervals [Link] [Link]
Merge k sorted lists [Link] [Link]
Merge sorted array [Link] [Link]
Merge two binary trees [Link] [Link]
Merge two sorted lists [Link] [Link]
Min cost climbing stairs [Link] [Link]
Min_stack [Link] [Link]
Minimum window substring [Link] [Link]
Minimum_window_substring [Link] [Link]
Missing number [Link] [Link]
Move zeroes [Link] [Link]
Moving average from data stream [Link] [Link]
Multiply strings [Link] [Link]
N_queens [Link] [Link]
Nested list weight sum [Link] [Link]
Nested list weight sum ii [Link] [Link]
New [Link] [Link]
Next closest time [Link] [Link]
Next permutation [Link] [Link]
Non decreasing array [Link] [Link]
Nth digit [Link] [Link]
Number_of_1_bits [Link] [Link]
Number_of_islands [Link] [Link]
Paint fence [Link] [Link]
Paint house [Link] [Link]
Palindrome linked list [Link] [Link]
Palindrome pairs [Link] [Link]
Palindromic substrings [Link] [Link]
Partition labels [Link] [Link]
Pascals triangle ii [Link] [Link]
Perfect squares [Link] [Link]
Permutations [Link] [Link]
Permutations_ii [Link] [Link]
Plus_one [Link] [Link]
Power_of_three [Link] [Link]
Power_of_two [Link] [Link]
Powx n [Link] [Link]
Pramp [Link] [Link]
Product of array except self [Link] [Link]
Queue reconstruction by height [Link] [Link]
Reach a number [Link] [Link]
Regular_expression_matching [Link] [Link]
Remove duplicate letters [Link] [Link]
Remove duplicates from sorted array [Link] [Link]
Repeated dna sequences [Link] [Link]
Repeated string match [Link] [Link]
Reverse bits [Link] [Link]
Reverse integer [Link] [Link]
Reverse linked list [Link] [Link]
Reverse vowels of a string [Link] [Link]
Robot return to origin [Link] [Link]
Roman to integer [Link] [Link]
Rotate array [Link] [Link]
Rotate image [Link] [Link]
Search a 2d matrix ii [Link] [Link]
Search for a range [Link] [Link]
Search in rotated sorted array [Link] [Link]
Second highest salary [Link] [Link]
Second minimum node in a binary tree [Link] [Link]
Serialize and deserialize binary tree [Link] [Link]
Set matrix zeroes [Link] [Link]
Shortest palindrome [Link] [Link]
Shortest unsorted continuous subarray [Link] [Link]
Shortest word distance [Link] [Link]
Shortest word distance ii [Link] [Link]
Single_number [Link] [Link]
Single_number_ii [Link] [Link]
Sliding window maximum [Link] [Link]
Sort colors [Link] [Link]
Sparse matrix multiplication [Link] [Link]
Spiral matrix [Link] [Link]
Sqrtx [Link] [Link]
String compression [Link] [Link]
Strobogrammatic number [Link] [Link]
Subsets [Link] [Link]
Sum of square numbers [Link] [Link]
Sum_of_two_integers [Link] [Link]
Summary ranges [Link] [Link]
Symmetric tree [Link] [Link]
Tenth line [Link] [Link]
Text justification [Link] [Link]
The skyline problem [Link] [Link]
Third maximum number [Link] [Link]
Total_hamming_distance [Link] [Link]
Trapping_rain_water [Link] [Link]
Two sum [Link] [Link]
Two sum ii input array is sorted [Link] [Link]
Two sum iii data structure design [Link] [Link]
Valid anagram [Link] [Link]
Valid number [Link] [Link]
Valid palindrome [Link] [Link]
Valid perfect square [Link] [Link]
Valid phone numbers [Link] [Link]
Valid_parentheses [Link] [Link]
Validate binary search tree [Link] [Link]
Walking robot simulation [Link] [Link]
Wiggle sort [Link] [Link]
Word break [Link] [Link]
Word break ii [Link] [Link]
Word ladder [Link] [Link]
Word pattern [Link] [Link]
Word search [Link] [Link]