{"id":16556719,"url":"https://github.com/xxrjun/leetcode-python","last_synced_at":"2025-03-04T23:23:47.135Z","repository":{"id":45524715,"uuid":"512598691","full_name":"xxrjun/leetcode-python","owner":"xxrjun","description":"Record of my leetcode journey.  Solutions in python3.","archived":false,"fork":false,"pushed_at":"2022-09-20T06:08:59.000Z","size":132,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-15T02:38:47.091Z","etag":null,"topics":["leetcode-python","leetcode-solutions","mysql","pyhton","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xxrjun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-11T03:03:58.000Z","updated_at":"2023-03-07T06:43:15.000Z","dependencies_parsed_at":"2023-01-18T15:45:17.687Z","dependency_job_id":null,"html_url":"https://github.com/xxrjun/leetcode-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxrjun%2Fleetcode-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxrjun%2Fleetcode-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxrjun%2Fleetcode-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxrjun%2Fleetcode-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xxrjun","download_url":"https://codeload.github.com/xxrjun/leetcode-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234010271,"owners_count":18765372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["leetcode-python","leetcode-solutions","mysql","pyhton","python3"],"created_at":"2024-10-11T20:05:32.904Z","updated_at":"2025-01-15T08:13:42.868Z","avatar_url":"https://github.com/xxrjun.png","language":"Python","readme":"# LeetCode Python\n\nStart from 2022/07/11.\n\n## Study Plan\n\n| Study Plan (with leetcode link)                                     |                    Code                     | Start At | Update   | Day           | Done               |\n| ------------------------------------------------------------------- | :-----------------------------------------: | -------- | -------- | ------------- | ------------------ |\n| [Date Structure I](https://leetcode.com/study-plan/data-structure/) |      [:link: link](./study-plan/ds-1/)      | 22/07/11 | 22/07/18 | **_14 / 14_** | :white_check_mark: |\n| [Algorithm I](https://leetcode.com/study-plan/algorithm/)           |     [:link: link](./study-plan/algo-1/)     | 22/07/28 | 22/08/10 | **_14 / 14_** | :white_check_mark: |\n| [Binary Search I](https://leetcode.com/study-plan/binary-search/)   | [:link: link](./study-plan/binarysearch-1/) | 22/08/11 | 22/08/22 | **_12/ 12_**  | :white_check_mark: |\n\n## Resources\n\n| Videos (Youtube)                                                                                                     | Language | Programming Language |\n| -------------------------------------------------------------------------------------------------------------------- | :------: | -------------------- |\n| [NeetCode](https://www.youtube.com/c/NeetCode)                                                                       | English  | Python               |\n| [今天比昨天厲害](https://www.youtube.com/c/%E4%BB%8A%E5%A4%A9%E6%AF%94%E6%98%A8%E5%A4%A9%E5%8E%B2%E5%AE%B3/featured) |   中文   | Python               |\n| [花花醬 Hua Hua](https://www.youtube.com/c/HuaHuaLeetCode)                                                           |   中文   | C++                  |\n\n## Problems \u0026 Solutions\n\n### [Solution Code in Python3](./solutions-python3/)\n\n| #    | Title                                                                                                                                             | Level  | Solution                                                                           | Category                             |\n| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------- | ------------------------------------ |\n| 1    | [Two Sum](https://leetcode.com/problems/two-sum/)                                                                                                 | Easy   | [python](./solutions-python3/1-TwoSum.py)                                          | Array, Hash Table                    |\n| 3    | [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters/)                   | Medium | [python](./solutions-python3/3-LongestSubstringWithoutRepeatingCharacters.py)      | Hash Table, String                   |\n| 19   | [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/)                                               | Medium | [python](./solutions-python3/19-RemoveNthNodeFromEndofList.py)                     | Linked List, Two Pointers            |\n| 20   | [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/)                                                                             | Easy   | [python](./solutions-python3/20-ValidParentheses.py)                               | Stack, String                        |\n| 21   | [Merge Two Sorted Lists](https://leetcode.com/problems/merge-two-sorted-lists/)                                                                   | Easy   | [python](./solutions-python3/21-MergeTwoSortedLists.py)                            | Linked List, Recursions              |\n| 33   | [Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/)                                                   | Medium | [python](./solutions-python3/33-SearchinRotatedSortedArray.py)                     | Array, Binary Search                 |\n| 34   | [Find First and Last Position of Element in Sorted Array](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/) | Medium | [python](./solutions-python3/34-FindFirstandLastPositionofElementinSortedArray.py) | Array, Binary Search                 |\n| 35   | [Search Insert Position](https://leetcode.com/problems/search-insert-position/)                                                                   | Easy   | [python](./solutions-python3/35-SearchInsertPosition.py)                           | Array, Binary Search                 |\n| 36   | [Valid Sudoku](https://leetcode.com/problems/valid-sudoku/)                                                                                       | Medium | [python](./solutions-python3/36-ValidSudoku.py)                                    | Array, Hash Table                    |\n| 46   | [Permutations](https://leetcode.com/problems/permutations/)                                                                                       | Medium | [python](./solutions-python3/46-Permutations.py)                                   | Array, Backtracking                  |\n| 53   | [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/)                                                                               | Medium | [python](./solutions-python3/53-MaximumSubarray.py)                                | Array                                |\n| 69   | [Sqrt(x)](https://leetcode.com/problems/sqrtx/)                                                                                                   | Easy   | [python](\u003c./solutions-python3/69-Sqrt(x).py\u003e)                                      | Binary Search, Math                  |\n| 70   | [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/)                                                                                 | Easy   | [python](./solutions-python3/70-ClimbingStairs.py)                                 | Math                                 |\n| 74   | [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/)                                                                           | Medium | [python](./solutions-python3/74-Searcha2DMatrix.py)                                | Array,Binary Search, Matrix          |\n| 77   | [Combinations](https://leetcode.com/problems/combinations/)                                                                                       | Medium | [python](./solutions-python3/77-Combinations.py)                                   | Backtracking                         |\n| 83   | [Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/)                                           | Easy   | [python](./solutions-python3/83-RemoveDuplicatesfromSortedList.py)                 | Linked List                          |\n| 88   | [Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/)                                                                           | Easy   | [python](./solutions-python3/88-MergeSortedArray.py)                               | Array, Two Pointers                  |\n| 94   | [Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/)                                                     | Easy   | [python](./solutions-python3/94-BinaryTreeInorderTraversal.py)                     | DFS, Stack, Tree                     |\n| 98   | [Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/)                                                         | Medium | [python](./solutions-python3/98-ValidateBinarySearchTree.py)                       | DFS, Tree                            |\n| 101  | [Symmetric Tree](https://leetcode.com/problems/symmetric-tree/)                                                                                   | Easy   | [python](./solutions-python3/101-SymmetricTree.py)                                 | DFS, Tree                            |\n| 102  | [Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/)                                             | Medium | [python](./solutions-python3//102-BinaryTreeLevelOrderTraversal.py)                | BFS, Tree                            |\n| 104  | [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)                                                       | Easy   | [python](./solutions-python3/104-MaximumDepthofBinaryTree.py)                      | DFS, Tree                            |\n| 112  | [Path Sum](https://leetcode.com/problems/path-sum/)                                                                                               | Easy   | [python](./solutions-python3/112-PathSum.py)                                       | DFS, Tree                            |\n| 116  | [Populating Next Right Pointers in Each Node](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/)                         | Medium | [python](./solutions-python3/116-PopulatingNextRightPointersinEachNode.py)         | Linked List, Tree                    |\n| 118  | [Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/)                                                                              | Easy   | [python](./solutions-python3/118-PascalsTriangle.py)                               | Array                                |\n| 120  | [Triangle](https://leetcode.com/problems/triangle/)                                                                                               | Medium | [python](./solutions-python3/120-Triangle.py)                                      | Array                                |\n| 121  | [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)                                                 | Easy   | [python](./solutions-python3/121-BestTimetoBuyandSellStock.py)                     | Array                                |\n| 136  | [Single Number](https://leetcode.com/problems/single-number/)                                                                                     | Easy   | [python](./solutions-python3/136-SingleNumber.py)                                  | Array                                |\n| 141  | [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/)                                                                             | Easy   | [python](./solutions-python3/141-LinkedListCycle.py)                               | Hash Table, Two Pointers             |\n| 144  | [Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/)                                                   | Easy   | [python](./solutions-python3/144-BinaryTreePreorderTraversal.py)                   | DFS,Stack, Tree                      |\n| 145  | [Binary Tree Postorder Traversal](https://leetcode.com/problems/binary-tree-postorder-traversal/)                                                 | Easy   | [python](./solutions-python3/145-BinaryTreePostorderTraversal.py)                  | DFS,Stack, Tree                      |\n| 153  | [Find Minimum in Rotated Sorted Array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/)                                       | Medium | [python](./solutions-python3/153-FindMinimuminRotatedSortedArray.py)               | Array, Binary Search                 |\n| 167  | Two Sum II - Input Array Is Sorted                                                                                                                | Medium | [python]()                                                                         | Array,Binary Search, Two Pointers    |\n| 189  | Rotate Array                                                                                                                                      | Medium | [python]()                                                                         | Array, Math                          |\n| 190  | Reverse Bits                                                                                                                                      | Easy   | [python]()                                                                         | Bit Manipulation, Divide and Conquer |\n| 191  | Number of 1 Bits                                                                                                                                  | Easy   | [python]()                                                                         | Bit Manipulation, Divide and Conquer |\n| 198  | House Robber                                                                                                                                      | Medium | [python]()                                                                         | Array                                |\n| 203  | Remove Linked List Elements                                                                                                                       | Easy   | [python]()                                                                         | Linked List, Recursions              |\n| 206  | Reverse Linked List                                                                                                                               | Easy   | [python]()                                                                         | Linked List, Recursions              |\n| 217  | Contains Duplicate                                                                                                                                | Easy   | [python]()                                                                         | Array, Hash Table                    |\n| 226  | Invert Binary Tree                                                                                                                                | Easy   | [python]()                                                                         | DFS, Tree                            |\n| 231  | Power of Two                                                                                                                                      | Easy   | [python]()                                                                         | Math                                 |\n| 232  | Implement Queue using Stacks                                                                                                                      | Easy   | [python]()                                                                         | Design, Queue, Stack                 |\n| 235  | Lowest Common Ancestor of a Binary Search Tree                                                                                                    | Easy   | [python]()                                                                         | DFS, Tree                            |\n| 242  | Valid Anagram                                                                                                                                     | Easy   | [python]()                                                                         | Hash Table, String                   |\n| 278  | First Bad Version                                                                                                                                 | Easy   | [python]()                                                                         | Binary Search, Interactive           |\n| 283  | Move Zeroes                                                                                                                                       | Easy   | [python]()                                                                         | Array, Two Pointers                  |\n| 344  | Reverse String                                                                                                                                    | Easy   | [python]()                                                                         | Array, Two Pointers                  |\n| 350  | [Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/)                                                     | Easy   | [python](./solutions-python3/350-IntersectionofTwoArraysII.py)                     | Array, Hash Table, Two Pointers      |\n| 367  | 367. Valid Perfect Square                                                                                                                         | Easy   | [python]()                                                                         | Binary Search, Math                  |\n| 374  | Guess Number Higher or Lower                                                                                                                      | Easy   | [python]()                                                                         | Binary Search, Interactive           |\n| 383  | Ransom Note                                                                                                                                       | Easy   | [python]()                                                                         | Hash Table, String                   |\n| 387  | First Unique Character in a String                                                                                                                | Easy   | [python]()                                                                         | Hash Table, String                   |\n| 441  | Arranging Coins                                                                                                                                   | Easy   | [python]()                                                                         | Binary Search ,Math                  |\n| 542  | 01 Matrix                                                                                                                                         | Medium | [python]()                                                                         | Array                                |\n| 557  | Reverse Words in a String III                                                                                                                     | Easy   | [python]()                                                                         | String, Two Pointers                 |\n| 566  | Reshape the Matrix                                                                                                                                | Easy   | [python]()                                                                         | Array, Matrix                        |\n| 567  | Permutation in String                                                                                                                             | Medium | [python]()                                                                         | Hash Table, String, Two Pointers     |\n| 617  | Merge Two Binary Trees                                                                                                                            | Easy   | [python]()                                                                         | DFS, Tree                            |\n| 633  | [Sum of Square Numbers](https://leetcode.com/problems/sum-of-square-numbers/)                                                                     | Medium | [python](./solutions-python3/633-SumofSquareNumbers.py)                            | Binary Search, Math, Two Pointers    |\n| 653  | Two Sum IV - Input is a BST                                                                                                                       | Easy   | [python]()                                                                         | Hash Table, Tree, Two Pointers       |\n| 695  | Max Area of Island                                                                                                                                | Medium | [python]()                                                                         | Array, DFS                           |\n| 700  | Search in a Binary Search Tree                                                                                                                    | Easy   | [python]()                                                                         | Binary Search Tree, Tree             |\n| 701  | Insert into a Binary Search Tree                                                                                                                  | Medium | [python]()                                                                         | Binary Search Tree, Tree             |\n| 702  | Binary Search                                                                                                                                     | Easy   | [python]()                                                                         | Array, Binary Search                 |\n| 733  | Flood Fill                                                                                                                                        | Easy   | [python]()                                                                         | Array, DFS                           |\n| 744  | Find Smallest Letter Greater Than Target                                                                                                          | Easy   | [python]()                                                                         | Array, Binary Search                 |\n| 784  | Letter Case Permutation                                                                                                                           | Medium | [python]()                                                                         | Backtracking, String                 |\n| 852  | Peak Index in a Mountain Array                                                                                                                    | Medium | [python]()                                                                         | Array, Binary Search                 |\n| 876  | Middle of the Linked List                                                                                                                         | Easy   | [python]()                                                                         | Linked List, Two Pointers            |\n| 977  | Squares of a Sorted Array                                                                                                                         | Easy   | [python]()                                                                         | Array, Sorting, Two Pointers         |\n| 994  | Rotting Oranges                                                                                                                                   | Medium | [python]()                                                                         | Array, BFS,Matrix                    |\n| 1337 | [The K Weakest Rows in a Matrix](https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/)                                                   | Easy   | [python](./solutions-python3/1337-TheKWeakestRowsinaMatrix.py)                     | Array, Binary Search, Sorting        |\n| 1346 | [Check If N and Its Double Exist](https://leetcode.com/problems/check-if-n-and-its-double-exist/)                                                 | Easy   | [python](./solutions-python3/1346-CheckIfNandItsDoubleExist.py)                    | Array, Hash Table, Two Pointers      |\n| 1351 | Count Negative Numbers in a Sorted Matrix                                                                                                         | Easy   | [python]()                                                                         | Array, Binary Search Tree, Matrix    |\n| 1385 | Find the Distance Value Between Two Arrays                                                                                                        | Easy   | [python]()                                                                         | Array, Binary Search, Two Pointers   |\n| 1539 | Kth Missing Positive Number                                                                                                                       | Easy   | [python]()                                                                         | Array, Binary Search                 |\n| 1608 | Special Array With X Elements Greater Than or Equal X                                                                                             | Easy   | [python]()                                                                         | Array, Binary Search, Sorting        |\n| 1855 | [Maximum Distance Between a Pair of Values](https://leetcode.com/problems/maximum-distance-between-a-pair-of-values/)                             | Medium | [python](./solutions-python3/1855-MaximumDistanceBetweenaPairofValues.py)          | Array, Binary Search, Two Pointers   |\n\n### [Solution Code in MySQL](./solutions-mysql/)\n\n| #    | Title                                                                                             | Level | Solution                                                        | Category |\n| ---- | ------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------------- | -------- |\n| 595  | [Big Countries](https://leetcode.com/problems/big-countries/)                                     | Easy  | [MySQL](./solutions-mysql/595-BigCountries.sql)                 | Database |\n| 1757 | [Recyclable and Low Fat Products](https://leetcode.com/problems/recyclable-and-low-fat-products/) | Easy  | [MySQL](./solutions-mysql/1757-RecyclableandLowFatProducts.sql) | Database |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxrjun%2Fleetcode-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxxrjun%2Fleetcode-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxrjun%2Fleetcode-python/lists"}