/leetcode

record my leetcode learning

Primary LanguagePython

Leetcode

Introduction

Record my learning path in leetcode, including my submissions and others

Python Link

Python Lib: https://docs.python.org/3.8/library/index.html

Regular Expression: https://blog.csdn.net/weixin_38256474/article/details/83278333

Prime Count: https://blog.csdn.net/Snow_Me/article/details/52588819

Binary Tree:

binary tree

https://www.geeksforgeeks.org/bfs-vs-dfs-binary-tree/

https://www.tutorialspoint.com/data_structures_algorithms/hash_data_structure.htm

Regex: https://www.runoob.com/python/python-reg-expressions.html

sorting of dictionary

https://www.cnblogs.com/beile/p/11276532.html

Leetcode Problem

Easy (By Frequency)

# Title Tag Solution1 Solution2
0001 Two Sum Array, Hash Table Python
0020 Valid Parentheses String, Stack Python
0021 Merge Two Sorted Lists Linked List Python
0053 Maximum Subarray Array, Divide and Conquer, Dynamic Programming Python
0937 Reorder Data in Log Files String, Sort Python
0121 Best Time to Buy and Sell Stock Array, Dynamic Programming Python
0206 Reverse Linked List Linekd List Python
0202 Happy Number Hash Table, Math Python
0953 Verifying an Alien Dictionary Hash Table Python
0007 Reverse Integer Math Python
0415 Add Strings String Python
0088 Merge Sorted Array Array, Two Pointers Python
0706 Design HashMap Hash Map Python
0811 Subdomain Visit Count Hash Table Python
0412 Fizz Buzz Math Python
0155 Min Stack Stack Python
0283 Move Zeroes Array, Two Pointers Python
0543 Diameter of Binary Tree Tree Python
0009 Palindrome Number Math Python
0067 Add Binary Math, String Python
0680 Valid Palindrome II String Python
0013 Roman to Integer String Python
0070 Climbing Stairs Dynamic Programming Python
0136 Single Number Hash Table, Bit Manipulation Python
0014 Longest Common Prefix String Python
0125 Valid Palindrome Two Pointers, String Python
0443 String Compression String Python
0204 Count Primes Hash Table, Math Python
0038 Count and Say String Python
0234 Palindrome Linked List Linked List, Two Pointers Python
0819 Most Common Word String Python
0387 First Unique Character in a String Hash Table, String Python
0359 Logger Rate Limiter Hash Table, Design Python
0268 Missing Number Array, Math, Bit Manipulation Python
0198 House Robber Dynamic Programming Python
0242 Valid Anagram Hash Table, Sort Python
0101 Symmetric Tree Tree, Depth-first Search, Breadth-first Search Python
0122 Best Time to Buy and Sell Stock II Array, Greedy Python
0716 Max Stack Design Python
0349 Intersection of Two Arrays Hash Table, Two Pointers, Binary Search, Sort Python
0203 Remove Linked List Elements Linked List Python
0167 Two Sum II - Input array is sorted Array, Two Pointers, Binary Search Python
0278 First Bad Version Binary Search Python
1086 High Five Array, Hash Table, Sort Python
0339 Nested List Weight Sum Depth-first Search Python
0532 K-diff Pairs in an Array Array, Two Pointers Python
0108 Convert Sorted Array to Binary Search Tree Tree, Depth-first Search Python
0112 Path Sum Tree, Depth-first Search Python
0113 Path Sum II Tree, Depth-first Search Python
0437 Path Sum III Tree Python
0256 Paint House Dynamic Programming Python
0344 Reverse String Two Pointers, Stirng Python
0169 Majority Element Array, Divide and Conquer, Bit Manipulation Python
0160 Intersection of Two Linked Lists Linked List Python
0773 Flood Fill Depth_first Search Python
0463 Island Perimeter Hash Table Python
0938 Range Sum of BST Tree, Recursion Python
0232 Implement Queue using Stacks Stack, Design Python
0703 Kth Largest Element in a Stream Heap Python
0243 Shortest Word Distance Array Python
0104 Maximum Depth of Binary Tree Tree, Depth-first Search Python
0189 Rotate Array Array Python
0270 Closest Binary Search Tree Value Binary Search, Tree Python
0836 Rectangle Overlap Math Python
0509 Fibonacci Number Array Python
0977 Squares of a Sorted Array Array, Two Pointers Python
0205 Isomorphic Strings Hash Table Python
0141 Linked List Cycle Linked List, Two Pointers Python
0083 Remove Duplicates from Sorted List Linked List Python
0118 Pascal's Triangle Array Python
0844 Backspace String Compare Two Pointers, Stack Python
0028 Implement strStr() Two Pointers, String Python
0168 Excel Sheet Column Title Math Python
0876 Middle of the Linked List Linked List Python
0448 Find All Numbers Disappeared in an Array Array Python
0557 Reverse Words in a String III String Python
0026 Remove Duplicates from Sorted Array Array, Two Pointers Python
0226 Invert Binary Tree Tree Python
0796 Rotate String String Python
0628 Maximum Product of Three Numbers Array, Math Python
1010 Pairs of Songs With Total Durations Divisible by 60 Array Python
0069 Sqrt(x) Math, Binary Search Python
0453 Minimum Moves to Equal Array Elements Math Python
1071 Greatest Common Divisor of Strings String Python
0171 Excel Sheet Column Number Math Python
0496 Next Greater Element I Stack Python
1029 Two City Scheduling Greedy Python
0346 Moving Average from Data Stream Design, Queue Python C++
0257 Binary Tree Paths Tree, Depth-first Search Python C++
0371 Sum of Two Integers Bit Manipulation Python C++
1360 Number of Days Between Two Dates Python C++
0299 Bulls and Cows Hash Table Python C++
0217 Contains Duplicate Array, Hash Table Python C++
1047 Remove All Adjacent Duplicates In String Stack Python C++
0724 Find Pivot Index Array Python C++
0246 Strobogrammatic Number Hash Table, Math Python C++
0350 Intersection of Two Arrays II Hash Table, Two Pointers, Binary Search, Sort Python C++
1313 Decompress Run-Length Encoded List Array Python C++
0572 Subtree of Another Tree Tree Python C++
0605 Can Place Flowers Array Python C++

Medium (Frequency + Random)

# Title Tag Solution1
0002 Add Two Numbers Linked List, Math Python
0006 ZigZag Conversion String Python
0008 String to Integer (atoi) Math String Python
0003 Longest Substring Without Repeating Characters Hash Table, Two Pointers, String, Sliding Window Python
0200 Number of Islands Depth-first Search, Breadth-first Search, Union Find Python
0146 LRU Cache Design Python
0005 Longest Palindromic Substring String, Dynamic Programming Python
0005 Rotting Oranges Breadth-fisrt Search Python
0015 3Sum Array, Two Pointers Python
0238 Product of Array Except Self Array Python
0056 Merge Intervals Array Python
1249 Minimum Remove to Make Valid Parentheses String, Stack Python
0973 K Closest Points to Origin Divide and Conquer, Heap, Sort Python
0031 Next Permutation Array Python
0022 Generate Parentheses String, Backtracking Python
0560 Subarray Sum Equals K Array, Hash Table Python
0692 Top K Frequent Words Hash Table, Heap, Trie Python
0033 Search in Rotated Sorted Array Array, Binary Search Python
0081 Search in Rotated Sorted Array II Array, Binary Search Python
0011 Container With Most Water Array, Two Pointers Python
0139 Word Break Dynamic Programming Python
0322 Coin Change Dynamic Programming Python
0253 Meeting Rooms II Heap, Greedy, Sort Python
0054 Spiral Matrix Array Python
0981 Time Based Key-Value Store Hash Table, Binary Search Python
0380 Insert Delete GetRandom O(1) Array, Hash Table, Design Python
0049 Group Anagrams Hash Table, String Python
0017 Letter Combinations of a Phone Number String, Backtrakcing Python
0215 Kth Largest Element in an Array Divide adnd Conquer, Heap Python
0046 Permutations Backtracking Python
0138 Copy List with Random Pointer Hash Table, Linked List Python
0091 Decode Ways String, Dynamic Programming Python
0289 Game of Life Array Python
0763 Partition Labels Two Pointers, Greedy Python
0199 Binary Tree Right Side View Tree, DFS, BFS Python
0221 Maximal Square Dynamic Programming Python
0127 Word Ladder BFS Python
0079 Word Search Array, Backtracking Python
0362 Design Hit Counter Design Python
0394 Decode String Stack, DFS Python
0609 Find Duplicate File in System Hash Table, String Python
0207 Basic Calculator II String Python

| 0046 | Permutations| Backtracking | Python |