https://github.com/librauee/leetcode
🛵Python 3解题
https://github.com/librauee/leetcode
Last synced: about 1 year ago
JSON representation
🛵Python 3解题
- Host: GitHub
- URL: https://github.com/librauee/leetcode
- Owner: librauee
- Created: 2019-03-23T03:35:06.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-09T04:54:19.000Z (over 6 years ago)
- Last Synced: 2025-04-23T07:04:42.022Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 68.4 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Leetcode
Most of problems have different solutions and the solutions beat over 80% .
Language:Python3
* Array
| Number | Problem | Solution | Difficulty |
|:------:|:------:|:------:|:------:|
|1| [Two Sum](https://leetcode.com/problems/two-sum/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/1.two_sum.py) | Easy |
|26| [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/26.remove_duplicates.py) | Easy |
|27| [Remove Element](https://leetcode.com/problems/remove-element/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/27.remove_element.py) | Easy |
|35| [Search Insert Position](https://leetcode.com/problems/search-insert-position/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/35.search_insert_position.py) | Easy |
|53| [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/53.Maximum_Subarray.py) | Easy |
|485| [Max Consecutive Ones](https://leetcode.com/problems/max-consecutive-ones/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/485.Max_Consecutive_Ones.py) | Easy |
|509| [Fibonacci Number](https://leetcode.com/problems/fibonacci-number/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/509.Fibonacci_Number.py) | Easy |
|561| [Array Partition I](https://leetcode.com/problems/array-partition-i/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/561.Array_Partition_I.py) | Easy |
|566| [Reshape the Matrix](https://leetcode.com/problems/reshape-the-matrix/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/566.Reshape_the_Matrix.py) | Easy |
|766| [Toeplitz Matrix](https://leetcode.com/problems/toeplitz-matrix/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/766.Toeplitz_Matrix.py) | Easy |
|832| [Flipping an Image](https://leetcode.com/problems/flipping-an-image/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/832.Flipping_Image.py) | Easy |
|867| [Transpose Matrix](https://leetcode.com/problems/transpose-matrix/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/867.Transpose_Matrix.py) | Easy |
|888| [Fair Candy Swap](https://leetcode.com/problems/fair-candy-swap/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/888.Fair_Candy_Swap.py) | Easy |
|896| [Monotonic Array](https://leetcode.com/problems/monotonic-array/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/896.Monotonic_Array.py) | Easy |
|905| [Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/905.Sort_Array_By_Parity.py) | Easy |
|922| [Sort Array By Parity II](https://leetcode.com/problems/sort-array-by-parity-ii/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/922.Sort_Array_By_Parity_II.py) | Easy |
|977| [Squares of a Sorted Array](https://leetcode.com/problems/squares-of-a-sorted-array/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/977.squares_array.py) | Easy |
|985| [Sum of Even Numbers After Queries](https://leetcode.com/problems/sum-of-even-numbers-after-queries/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/985.Sum_of_Even_Numbers_After_Queries.py) | Easy |
|1002| [Find Common Characters](https://leetcode.com/problems/find-common-characters/) | [Python3](https://github.com/librauee/leetcode/blob/master/Array/1002.Find_Common_Characters.py) | Easy |
* Linked_List
| Number | Problem | Solution | Difficulty |
|:------:|:------:|:------:|:------:|
|2| [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) | [Python3](https://github.com/librauee/leetcode/blob/master/Linked_List/2.Add_Two_Numbers.py) | Medium |
|19| [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/) | [Python3](https://github.com/librauee/leetcode/blob/master/Linked_List/19.Remove_Nth_Node_From_End_of_List.py) | Medium |
|21| [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/) | [Python3](https://github.com/librauee/leetcode/blob/master/Linked_List/21.Merge_Two_Sorted_Lists.py) | Medium |
|24| [Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/) | [Python3](https://github.com/librauee/leetcode/blob/master/Linked_List/24.Swap_Nodes_in_Pairs.py) | Medium |
|206| [Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/) | [Python3](https://github.com/librauee/leetcode/blob/master/Linked_List/206.Reverse_Linked_List.py) | Easy |
* Math
| Number | Problem | Solution | Difficulty |
|:------:|:------:|:------:|:------:|
|7| [Reverse Integer](https://leetcode.com/problems/reverse-integer/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/7.Reverse_Integer.py) | Easy |
|9| [Palindrome Number](https://leetcode.com/problems/palindrome-number/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/9.Palindrome_Number.py) | Easy |
|69| [Sqrt(x)](https://leetcode.com/problems/sqrtx/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/69.Sqrt.py) | Easy |
|168| [Excel Sheet Column Title](https://leetcode.com/problems/excel-sheet-column-title/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/168.Excel_Sheet_Column_Title.py) | Easy |
|171| [Excel Sheet Column Number](https://leetcode.com/problems/excel-sheet-column-number/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/171.Excel_Sheet_Column_Number.py) | Easy |
|172| [Factorial Trailing Zeroes](https://leetcode.com/problems/factorial-trailing-zeroes/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/172.Factorial_Trailing_Zeroes.py) | Easy |
|202| [Happy Number](https://leetcode.com/problems/happy-number/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/202.Happy_Number.py) | Easy |
|204| [Count Primes](https://leetcode.com/problems/count-primes/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/204.Count_Primes.py) | Easy |
|231| [Power of Two](https://leetcode.com/problems/power-of-two/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/231.Power_of_Two.py) | Easy |
|258| [Add Digits](https://leetcode.com/problems/add-digits/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/258.Add_Digits.py) | Easy |
|263| [Ugly Number](https://leetcode.com/problems/ugly-number/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/263.Ugly_Number.py) | Easy |
|268| [Missing Number](https://leetcode.com/problems/missing-number/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/268.Missing_Number.py) | Easy |
|326| [Power of Three](https://leetcode.com/problems/power-of-three/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/326.Power_of_Three.py) | Easy |
|367| [Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/367.Valid_Perfect_Square.py) | Easy |
|400| [Nth Digit](https://leetcode.com/problems/nth-digit/) | [Python3](https://github.com/librauee/leetcode/blob/master/Math/400.Nth_Digit.py) | Easy |
* String
| Number | Problem | Solution | Difficulty |
|:------:|:------:|:------:|:------:|
|13| [Roman to Integer](https://leetcode.com/problems/roman-to-integer/) | [Python3](https://github.com/librauee/leetcode/blob/master/String/13.Roman%20_to_Integer.py) | Easy |
|14| [Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/) | [Python3](https://github.com/librauee/leetcode/blob/master/String/14.Longest_Common_Prefix.py) | Easy |
|20| [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) | [Python3](https://github.com/librauee/leetcode/blob/master/String/20.Valid_Parentheses.py) | Easy |
|28| [Implement strStr()](https://leetcode.com/problems/implement-strstr/) | [Python3](https://github.com/librauee/leetcode/blob/master/String/28.Implement_strStr.py) | Easy |
|38| [Count and Say](https://leetcode.com/problems/count-and-say/) | [Python3](https://github.com/librauee/leetcode/blob/master/String/38.Count_and_Say.py) | Easy |
|58| [Length of Last Word](https://leetcode.com/problems/length-of-last-word/) | [Python3](https://github.com/librauee/leetcode/blob/master/String/58.Length_of_Last_Word.py) | Easy |
|67| [Add Binary](https://leetcode.com/problems/add-binary/) | [Python3](https://github.com/librauee/leetcode/blob/master/String/67.Add_Binary.py) | Easy |
|125| [Valid Palindrome](https://leetcode.com/problems/valid-palindrome/) | [Python3](https://github.com/librauee/leetcode/blob/master/String/125.Valid_Palindrome.py) | Easy |
|344| [Reverse String](https://leetcode.com/problems/reverse-string/) | [Python3](https://github.com/librauee/leetcode/blob/master/String/344.Reverse_String.py) | Easy |
* Tree