{"id":21069508,"url":"https://github.com/clintjohnsn/ds-algo","last_synced_at":"2025-03-14T02:27:57.125Z","repository":{"id":71281807,"uuid":"523627911","full_name":"clintjohnsn/ds-algo","owner":"clintjohnsn","description":"Leetcode solutions in python, with time and complexity analysis and documentation.","archived":false,"fork":false,"pushed_at":"2024-07-22T16:39:32.000Z","size":7278,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T21:47:46.260Z","etag":null,"topics":["algorithms","data-structures","leetcode","leetcode-python","leetcode-python3","leetcode-solutions"],"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/clintjohnsn.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-11T07:34:13.000Z","updated_at":"2024-07-22T16:39:36.000Z","dependencies_parsed_at":"2024-07-22T19:55:20.382Z","dependency_job_id":"d42bc6e0-d854-4e27-aa06-140b97606c98","html_url":"https://github.com/clintjohnsn/ds-algo","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/clintjohnsn%2Fds-algo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clintjohnsn%2Fds-algo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clintjohnsn%2Fds-algo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clintjohnsn%2Fds-algo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clintjohnsn","download_url":"https://codeload.github.com/clintjohnsn/ds-algo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243510961,"owners_count":20302477,"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":["algorithms","data-structures","leetcode","leetcode-python","leetcode-python3","leetcode-solutions"],"created_at":"2024-11-19T18:35:56.555Z","updated_at":"2025-03-14T02:27:57.102Z","avatar_url":"https://github.com/clintjohnsn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Leetcode Solutions\n\nRegularly updated Leetcode solutions in python. Multiple approaches and solutions for every problem, along with time and space complexity analysis and comments. Focus on data structures and algorithms.\n\n### Problem List\n\n| No  | Problem                                                                                                                                     | Source         | Difficulty | Solution                                                                           | Topic               |\n| --- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ---------- | ---------------------------------------------------------------------------------- | ------------------- |\n| 1   | [Count and Say](https://leetcode.com/problems/count-and-say/description/)                                                                   | LeetCode #38   | easy       | [solution](./arrays/easy/count_and_say.py)                                         | Arrays              |\n| 2   | [Power(x,n)](https://leetcode.com/problems/powx-n/description/)                                                                             | LeetCode #50   | easy       | [solution](./warmup/power.py)                                                      | Arrays              |\n| 3   | [Two Sum](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/)                                                      | LeetCode #167  | easy       | [solution](./arrays/easy/2sum.py)                                                  | Arrays              |\n| 4   | [Group Anagrams](https://leetcode.com/problems/group-anagrams/description/)                                                                 | LeetCode #49   | easy       | [solution](./arrays/easy/anagrams2.py)                                             | Arrays              |\n| 5   | [Remove Duplicates](https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/)                                         | LeetCode #26   | easy       | [solution](./arrays/easy/remove_duplicates.py)                                     | Arrays              |\n| 6   | [Pivot element/Equilibrium element](https://leetcode.com/problems/find-pivot-index/description/)                                            | LeetCode #724  | easy       | [solution](./arrays/easy/equilibrium.py)                                           | Arrays              |\n| 7   | [Array Intersection](https://leetcode.com/problems/intersection-of-two-arrays/description/)                                                 | LeetCode 349   | easy       | [solution](./arrays/easy/intersection.py)                                          | Arrays              |\n| 8   | [Last stone weight](https://leetcode.com/problems/last-stone-weight/)                                                                       | LeetCode #1046 | easy       | [solution](./arrays/easy/last_stone_weight.py)                                     | Arrays              |\n| 9   | [Majority Element](https://leetcode.com/problems/majority-element/description/)                                                             | Leetcode #169  | easy       | [solution](./arrays/easy/majority_element.py)                                      | Arrays              |\n| 10  | [Best time to buy and sell stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)                                           | Leetcode #121  | easy       | [solution](./arrays/easy/stock_buy_sell.py)                                        | Arrays              |\n| 11  | [Remove Duplicates](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)                                                     | Leetcode #26   | easy       | [solution](./arrays/easy/remove_duplicates.py)                                     | Arrays              |\n| 12  | [Reverse array in groups](https://leetcode.com/problems/reverse-string-ii/)                                                                 | Leetcode #541  | easy       | [solution](./arrays/easy/reverse-arr-in-groups.py)                                 | Arrays              |\n| 13  | [Sort Colors](https://leetcode.com/problems/sort-colors/description/)                                                                       | Leetcode #75   | easy       | [solution](./arrays/easy/sort012.py)                                               | Arrays              |\n| 14  | [Squares of sorted array](https://leetcode.com/problems/squares-of-a-sorted-array/)                                                         | Leetcode #977  | easy       | [solution](./arrays/easy/sorted_squares.py)                                        | Arrays              |\n| 15  | [Maximum difference between increasing elements](https://leetcode.com/problems/maximum-difference-between-increasing-elements/description/) | Leetcode #2016 | easy       | [solution](./arrays/easy/max-difference-2-el.py)                                   | Arrays              |\n| 16  | [Move zeroes](https://leetcode.com/problems/missing-number/description/)                                                                    | Leetcode #283  | easy       | [solution](./arrays/easy/movezeroes.py)                                            | Arrays              |\n| 17  | [Missing Number](https://leetcode.com/problems/missing-number/description/)                                                                 | Leetcode #268  | easy       | [solution](./arrays/easy/missingno.py)                                             | Arrays              |\n| 18  | [Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/description/)                                                            | Leetcode #118  | easy       | [solution](./arrays/easy/pascals_triangle.py)                                      | Arrays              |\n| 19  | [Triplet sum](https://leetcode.com/problems/3sum/)                                                                                          | Leetcode #15   | easy       | [solution](./arrays/easy/triplet.py)                                               | Arrays              |\n| 20  | [Three sum closest](https://leetcode.com/problems/3sum-closest/description/)                                                                | Leetcode #16   | medium     | [solution](./arrays/medium/3sum.py)                                                | Arrays              |\n| 21  | [Insert interval](https://leetcode.com/problems/insert-interval/)                                                                           | Leetcode #57   | medium     | [solution](./arrays/medium/insert_new_interval.py)                                 | Arrays              |\n| 22  | [Rotate Function](https://leetcode.com/problems/rotate-function/)                                                                           | Leetcode #396  | medium     | [solution](./arrays/medium/max_sum_of_rotations.py)                                | Arrays              |\n| 23  | [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/)                                                                         | Leetcode #53   | medium     | [solution](./arrays/medium/max_sum_subarray.py)                                    | Arrays              |\n| 24  | [Merge Intervals](https://leetcode.com/problems/merge-intervals/)                                                                           | Leetcode #56   | medium     | [solution](./arrays/medium/merge_intervals.py)                                     | Arrays              |\n| 25  | [Next Greater Element](https://leetcode.com/problems/next-greater-element-i/description/)                                                   | Leetcode #496  | medium     | [solution](./arrays/medium/next_greater_element.py)                                | Arrays              |\n| 26  | [Partition Labels](https://leetcode.com/problems/partition-labels/)                                                                         | Leetcode #763  | medium     | [solution](./arrays/medium/partition_labels.py)                                    | Arrays              |\n| 27  | [Product of Array except self](https://leetcode.com/problems/product-of-array-except-self/)                                                 | Leetcode #238  | medium     | [solution](./arrays/medium/product_except_self.py)                                 | Arrays              |\n| 28  | [Rotate Array](https://leetcode.com/problems/rotate-array/)                                                                                 | Leetcode #189  | medium     | [solution](./arrays/medium/rotate.py)                                              | Arrays              |\n| 29  | [Sliding Window Maximum](https://leetcode.com/problems/sliding-window-maximum/)                                                             | Leetcode #239  | medium     | [solution](./arrays/medium/sliding-window-max.py)                                  | Arrays              |\n| 30  | [Stock Span](https://leetcode.com/problems/online-stock-span/)                                                                              | Leetcode #901  | medium     | [solution](./arrays/medium/stock_span.py)                                          | Arrays              |\n| 31  | [K Subarray Sum](https://leetcode.com/problems/subarray-sum-equals-k/)                                                                      | Leetcode #560  | medium     | [solution](./arrays/medium/subarray_sum.py)                                        | Arrays              |\n| 32  | [Ugly Number](https://leetcode.com/problems/ugly-number-ii/)                                                                                | Leetcode #264  | medium     | [solution](./arrays/medium/uglynos.py)                                             | Arrays              |\n| 33  | [Increasing Triplet Subsequence](https://leetcode.com/problems/increasing-triplet-subsequence/)                                             | Leetcode #334  | pro        | [solution](./arrays/pro/triplet_increasing_subsequence.py)                         | Arrays              |\n| 34  | [Number of 1 bits](https://leetcode.com/problems/number-of-1-bits/)                                                                         | Leetcode #191  | easy       | [solution](./bit%20manipulation/easy/hamming_weight.py)                            | Bit Manipulation    |\n| 35  | [reverse bits](https://leetcode.com/problems/reverse-bits/)                                                                                 | Leetcode #190  | easy       | [solution](./bit%20manipulation/easy/reverse_unsigned_int_bits.py)                 | Bit Manipulation    |\n| 36  | [single number](https://leetcode.com/problems/single-number/)                                                                               | Leetcode #136  | easy       | [solution](./bit%20manipulation/easy/single_number.py)                             | Bit Manipulation    |\n| 37  | basic caeser cypher                                                                                                                         |                | easy       | [solution](./bruteforce/easy/cipher.py)                                            | Brute Force         |\n| 38  | [Good pairs](https://leetcode.com/problems/number-of-good-pairs/%20)                                                                        | Leetcode #1512 | easy       | [solution](./bruteforce/easy/countpairs.py)                                        | Brute Force         |\n| 39  | Find closest primes                                                                                                                         |                | easy       | [solution](./bruteforce/easy/magicwords.py)                                        | Brute Force         |\n| 40  | Power function                                                                                                                              |                | easy       | [solution](./bruteforce/easy/power.py)                                             | Brute Force         |\n| 41  | Submatrix Sum                                                                                                                               |                | easy       | [solution](./bruteforce/easy/submatrix_addition.py)                                | Brute Force         |\n| 42  | Disjoint Set                                                                                                                                |                | easy       | [solution](./disjoint%20set/easy/disjointset.py)                                   | Disjoint Sets       |\n| 43  | [Most stones removed](https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/%20)                                        | Leetcode #947  | medium     | [solution](./disjoint%20set/medium/most_stones_removed_with_same_row_or_column.py) | Disjoint Sets       |\n| 44  | [Number of Provinces](https://leetcode.com/problems/number-of-provinces/%20)                                                                | Leetcode #547  | medium     | [solution](./disjoint%20set/medium/number_of_sets.py)                              | Disjoint Sets       |\n| 45  | [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/%20)                                                                        | Leetcode #70   | easy       | [solution](./dynamic%20programming/easy/climbing_stairs.py)                        | Dynamic Programming |\n| 46  | Fibonacci                                                                                                                                   |                | easy       | [solution](./dynamic%20programming/easy/fibonacci.py)                              | Dynamic Programming |\n| 47  | [Min Cost Climbing Stairs](https://leetcode.com/problems/min-cost-climbing-stairs/%20)                                                      | Leetcode #746  | easy       | [solution](./dynamic%20programming/easy/min_cost_climbing_stairs.py)               | Dynamic Programming |\n| 48  | Assembly line scheduling                                                                                                                    |                | medium     | [solution](./dynamic%20programming/medium/assembly_line_scheduling.py)             | Dynamic Programming |\n| 49  | [Coin Change](https://leetcode.com/problems/coin-change/%20)                                                                                | Leetcode #322  | medium     | [solution](./dynamic%20programming/medium/coin_change.py)                          | Dynamic Programming |\n| 50  | Cutting Rod                                                                                                                                 |                | medium     | [solution](./dynamic%20programming/medium/cutting_rod.py)                          | Dynamic Programming |\n| 51  | [Edit Distance](https://leetcode.com/problems/edit-distance/%20)                                                                            | Leetcode #72   | medium     | [solution](./dynamic%20programming/medium/edit_distance.py)                        | Dynamic Programming |\n| 52  | [House Robber](https://leetcode.com/problems/house-robber/%20)                                                                              | Leetcode #198  | medium     | [solution](./dynamic%20programming/medium/house_robber.py)                         | Dynamic Programming |\n| 53  | Knapsack Problem                                                                                                                            |                | medium     | [solution](./dynamic%20programming/medium/knapsack.py)                             | Dynamic Programming |\n| 54  | [Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence/%20)                                                  | Leetcode #1143 | medium     | [solution](./dynamic%20programming/medium/lcs.py)                                  | Dynamic Programming |\n| 55  | Max sum subsequence                                                                                                                         |                | medium     | [solution](./dynamic%20programming/medium/max_sum_subsequence.py)                  | Dynamic Programming |\n| 56  | [Longest Common Subsequence](https://leetcode.com/problems/longest-common-subsequence/%20)                                                  | Leetcode #1143 | medium     | [solution](./dynamic%20programming/medium/lcs.py)                                  | Dynamic Programming |\n| 57  | [Min path triangle](https://leetcode.com/problems/triangle/)                                                                                | Leetcode #120  | medium     | [solution](./dynamic%20programming/medium/min_path_triangle.py)                    | Dynamic Programming |\n| 58  | [Unique Paths](https://leetcode.com/problems/unique-paths/%20)                                                                              | Leetcode #120  | medium     | [solution](./dynamic%20programming/medium/no_of_unique_paths.py)                   | Dynamic Programming |\n| 59  | [Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum/%20)                                                  | Leetcode #416  | medium     | [solution](./dynamic%20programming/medium/partition_equal_subset_sum.py)           | Dynamic Programming |\n| 60  | [Maximum product subarray](https://leetcode.com/problems/maximum-product-subarray/%20)                                                      | Leetcode #152  | pro        | [solution](./dynamic%20programming/medium/max_product_subarray.py)                 | Dynamic Programming |\n| 61  | Breadth First Search                                                                                                                        |                | easy       | [solution](./graphs/easy/bfs.py)                                                   | Graphs              |\n| 62  | Depth First Search                                                                                                                          |                | easy       | [solution](./dynamic%20programming/medium/lcs.py)                                  | Graphs              |\n| 63  | Flood Fill                                                                                                                                  |                | easy       | [solution](./dynamic%20programming/medium/lcs.py)                                  | Graphs              |\n| 64  | [Number of Islands](https://leetcode.com/problems/number-of-islands/%20)                                                                    | Leetcode #200  | medium     | [solution](./graphs/medium/islands.py)                                             | Graphs              |\n| 65  | [Max Area of Island](https://leetcode.com/problems/max-area-of-island/%20)                                                                  | Leetcode #1152 | medium     | [solution](./dynamic%20programming/medium/max_area_of_islands.py)                  | Graphs              |\n| 66  | [01 Matrix](https://leetcode.com/problems/01-matrix/%20)                                                                                    | Leetcode #542  | medium     | [solution](./graphs/medium/nearest_zero.py)                                        | Graphs              |\n| 67  | [Pacific atlantic water flow](https://leetcode.com/problems/pacific-atlantic-water-flow/%20)                                                | Leetcode #417  | medium     | [solution](./graphs/medium/pacific_atlantic_water_flow.py)                         | Graphs              |\n| 68  | [Rotting Oranges](https://leetcode.com/problems/rotting-oranges/)                                                                           | Leetcode #994  | medium     | [solution](./graphs/medium/rotting_oranges.py)                                     | Graphs              |\n| 69  | [Valid Sudoku](https://leetcode.com/problems/valid-sudoku/%20)                                                                              | Leetcode #36   | medium     | [solution](./graphs/medium/valid_sudoku.py)                                        | Graphs              |\n| 70  | [Find the Celebrity](https://leetcode.com/problems/find-the-celebrity/%20)                                                                  | Leetcode #277  | pro        | [solution](./graphs/pro/celebrity.py)                                              | Graphs              |\n| 71  | Detect Cycle                                                                                                                                |                | pro        | [solution](./graphs/pro/detect_cycle.py)                                           | Graphs              |\n| 72  | Topological Sort                                                                                                                            |                | pro        | [solution](./graphs/pro/topological_sort.py)                                       | Graphs              |\n| 73  | [Longest Palindrome](https://leetcode.com/problems/longest-palindrome/%20)                                                                  | Leetcode #409  | easy       | [solution](./hashmaps/easy/longest_palindrome_length_zero.py)                      | Hashmaps            |\n| 74  | [Word Pattern](https://leetcode.com/problems/word-pattern/%20)                                                                              | Leetcode #290  | easy       | [solution](./hashmaps/easy/word_pattern.py)                                        | Hashmaps            |\n| 75  | [Anagrams](https://www.hackerrank.com/challenges/sherlock-and-anagrams/problem%20)                                                          |                | medium     | [solution](./hashmaps/medium/anagrams.py)                                          | Hashmaps            |\n| 76  | [Frequent Queries](https://www.hackerrank.com/challenges/frequency-queries/problem%20)                                                      |                | medium     | [solution](./hashmaps/medium/freq_queries.py)                                      | Hashmaps            |\n| 77  | LRU                                                                                                                                         |                | medium     | [solution](./hashmaps/medium/LRU.py)                                               | Hashmaps            |\n| 78  | [Task Scheduler](https://leetcode.com/problems/task-scheduler/%20)                                                                          | Leetcode #621  | medium     | [solution](./hashmaps/medium/task_scheduler.py)                                    | Hashmaps            |\n| 79  | [Bus Routes](https://leetcode.com/problems/bus-routes/%20)                                                                                  | Leetcode #815  | pro        | [solution](./hashmaps/pro/bus_routes.py)                                           | Hashmaps            |\n| 80  | LinkedList addition                                                                                                                         |                | easy       | [solution](./linkedlists/easy/addition.py)                                         | Linked Lists        |\n| 81  | [Linked List Intersection](https://leetcode.com/problems/intersection-of-two-linked-lists/%20)                                              | Leetcode #160  | easy       | [solution](./linkedlists/easy/intersection.py)                                     | Linked Lists        |\n| 82  | [Odd Even Linked List](https://leetcode.com/problems/odd-even-linked-list/%20)                                                              | Leetcode #328  | easy       | [solution](./linkedlists/easy/odd_even_ll.py)                                      | Linked Lists        |\n| 83  | [Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/%20)                                                          | Leetcode #234  | easy       | [solution](./linkedlists/easy/palindrome_linked_list.py)                           | Linked Lists        |\n| 84  | [Remove Elements in Linked List](https://leetcode.com/problems/remove-linked-list-elements/%20)                                             | Leetcode #203  | easy       | [solution](./linkedlists/easy/remove_elements.py)                                  | Linked Lists        |\n| 85  | [Remove Node Linked List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/%20)                                               | Leetcode #19   | easy       | [solution](./linkedlists/easy/remove_nth_node.py)                                  | Linked Lists        |\n| 86  | [Swapping Nodes Linked List](https://leetcode.com/problems/swapping-nodes-in-a-linked-list/%20)                                             | Leetcode #1721 | easy       | [solution](./linkedlists/easy/swap.py)                                             | Linked Lists        |\n| 87  | [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle-ii/%20)                                                                 | Leetcode #142  | medium     | [solution](./linkedlists/medium/cycle_detection.py)                                | Linked Lists        |\n| 88  | [Grouped Reverse Linked List](./Problem%20List.xlsx#%20https://leetcode.com/problems/reverse-nodes-in-k-group/)                             | Leetcode #25   | medium     | [solution](./linkedlists/medium/grouped_reverse.py)                                | Linked Lists        |\n| 89  | [Flatten Multilevel Linked List](https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/)                                    | Leetcode #430  | pro        | [solution](./linkedlists/pro/flatten.py)                                           | Linked Lists        |\n| 90  | [Reverse Integer](https://leetcode.com/problems/reverse-integer/%20)                                                                        | Leetcode #7    | easy       | [solution](./math/easy/reverse_integer.py)                                         | Math                |\n| 91  | Hourglass Matrix                                                                                                                            |                | easy       | [solution](./matrices/easy/hourglass.py)                                           | Matrices            |\n| 92  | Positional Elements in a Matrix                                                                                                             |                | easy       | [solution](./matrices/easy/positional_elements.py)                                 | Matrices            |\n| 93  | [Rotate Image](https://leetcode.com/problems/rotate-image/%20)                                                                              | Leetcode #48   | medium     | [solution](./matrices/medium/rotate.py)                                            | Matrices            |\n| 94  | [Set Matrix Zeroes](https://leetcode.com/problems/set-matrix-zeroes/)                                                                       | Leetcode #73   | medium     | [solution](./matrices/medium/setzeroes.py)                                         | Matrices            |\n| 95  | [Spiral Matrix](https://leetcode.com/problems/spiral-matrix/%20)                                                                            | Leetcode #54   | medium     | [solution](./matrices/medium/spiral.py)                                            | Matrices            |\n| 96  | [Where will the ball fall?](https://leetcode.com/problems/where-will-the-ball-fall/%20)                                                     | Leetcode #1706 | medium     | [solution](./matrices/medium/where_will_the_ball_fall.py)                          | Matrices            |\n| 97  | Binary Search                                                                                                                               |                | easy       | [solution](./search/easy/binarysearch.py)                                          | Search              |\n| 98  | [Search 2D matrix](https://leetcode.com/problems/search-a-2d-matrix-ii/%20)                                                                 | Leetcode #240  | medium     | [solution](./search/medium/matrix_search.py)                                       | Search              |\n| 99  | [Minimum Rotated Array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/)                                                | Leetcode #153  | medium     | [solution](./search/medium/rotated_array.py)                                       | Search              |\n| 100 | [Search sorted matrix](https://leetcode.com/problems/search-a-2d-matrix/%20)                                                                | Leetcode #74   | medium     | [solution](./search/medium/sorted_matrix.py)                                       | Search              |\n| 101 | Sorting Algoritms                                                                                                                           |                | easy       | [solution](./sorting/easy/sorting.py)                                              | Sorting             |\n| 102 | Sorting Linked Lists                                                                                                                        |                | medium     | [solution](./sorting/medium/linkedlists_sorting.py)                                | Sorting             |\n| 103 | [Sliding Median](https://www.hackerrank.com/challenges/fraudulent-activity-notifications/problem%20)                                        |                | medium     | [solution](./sorting/medium/slidingmedian.py)                                      | Sorting             |\n| 104 | [K Large elements in Array](https://leetcode.com/problems/kth-largest-element-in-an-array/)                                                 | Leetcode #215  | pro        | [solution](./sorting/pro/ksmallest.py)                                             | Sorting             |\n| 105 | 3-way Partition                                                                                                                             |                | pro        | [solution](./sorting/pro/three_way_partition_in_a_range.py)                        | Sorting             |\n| 106 | [FIFO Queue using Stack](https://leetcode.com/problems/implement-queue-using-stacks/)                                                       | Leetcode #232  | easy       | [solution](./stacks/easy/q_using_stacks.py)                                        | Stacks              |\n| 107 | [Valid Parenthesis](https://leetcode.com/problems/valid-parentheses/)                                                                       | Leetcode #20   | easy       | [solution](./stacks/easy/valid_parenthesis.py)                                     | Stacks              |\n| 108 | [Asteroid collision](https://leetcode.com/problems/asteroid-collision/)                                                                     | Leetcode #735  | medium     | [solution](./stacks/medium/asteroid_collision.py)                                  | Stacks              |\n| 109 | [Calculator](https://leetcode.com/problems/basic-calculator-ii/)                                                                            | Leetcode #227  | medium     | [solution](./stacks/medium/calculator.py)                                          | Stacks              |\n| 110 | [Decode String](https://leetcode.com/problems/decode-string/)                                                                               | Leetcode #394  | medium     | [solution](./stacks/medium/decode_string.py)                                       | Stacks              |\n| 111 | [Remove Adjacent Duplicates](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii/)                                    | Leetcode #1209 | medium     | [solution](./stacks/medium/shrink_burst_array.py)                                  | Stacks              |\n| 112 | [Min Stack](https://leetcode.com/problems/min-stack/)                                                                                       | Leetcode #155  | pro        | [solution](./stacks/pro/min_stack.py)                                              | Stacks              |\n| 113 | [Valid Anagram](https://leetcode.com/problems/valid-anagram/)                                                                               | Leetcode #242  | easy       | [solution](./strings/easy/anagram.py)                                              | Strings             |\n| 114 | [Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/)                                                         | Leetcode #844  | easy       | [solution](./strings/easy/backspace_compare.py)                                    | Strings             |\n| 115 | [Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/)                                                               | Leetcode #14   | easy       | [solution](./strings/easy/longest_common_prefix.py)                                | Strings             |\n| 116 | [Multiply Strings](https://leetcode.com/problems/multiply-strings/)                                                                         | Leetcode #43   | easy       | [solution](./strings/easy/mulitplication.py)                                       | Strings             |\n| 117 | [Bulls and Cows](https://leetcode.com/problems/bulls-and-cows/)                                                                             | Leetcode #299  | medium     | [solution](./strings/medium/bulls_cows.py)                                         | Strings             |\n| 118 | [Repeated DNA sequences](https://leetcode.com/problems/repeated-dna-sequences/)                                                             | Leetcode #187  | medium     | [solution](./strings/medium/dna_sequences.py)                                      | Strings             |\n| 119 | [K Frequent Words](https://leetcode.com/problems/top-k-frequent-words/)                                                                     | Leetcode #692  | medium     | [solution](./strings/medium/k_frequent_strings.py)                                 | Strings             |\n| 120 | [Longest Palindrome](https://leetcode.com/problems/longest-palindrome-you-can-build/)                                                       | Leetcode #2131 | medium     | [solution](./strings/medium/longest_palindrome_concatenating_two_letter.py)        | Strings             |\n| 121 | [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring/)                                               | Leetcode #5    | medium     | [solution](./strings/medium/longest_palindromic_substring.py)                      | Strings             |\n| 122 | [Longest repeating char replacement](https://leetcode.com/problems/longest-repeating-character-replacement/)                                | Leetcode #424  | medium     | [solution](./strings/medium/longest_repeating_character_replacement.py)            | Strings             |\n| 123 | [Longest substring without repeating chars](https://leetcode.com/problems/longest-substring-without-repeating-characters/)                  | Leetcode #3    | medium     | [solution](./strings/medium/longest-substring-without-repeating-chars.py)          | Strings             |\n| 124 | [Permutation in string](https://leetcode.com/problems/permutation-in-string/)                                                               | Leetcode #567  | medium     | [solution](./strings/medium/permutation_in_a_string.py)                            | Strings             |\n| 125 | [Min window substring](https://leetcode.com/problems/minimum-window-substring/)                                                             | Leetcode #76   | pro        | [solution](./strings/pro/min_window_substring.py)                                  | Strings             |\n| 126 | Smallest window containing another string                                                                                                   |                | pro        | [solution](./strings/pro/smallest_substring_window.py)                             | Strings             |\n| 127 | Tree BFS                                                                                                                                    |                | easy       | [solution](./trees/easy/bfs.py)                                                    | Trees               |\n| 128 | Binary Tree Inorder Traversal                                                                                                               |                | easy       | [solution](./trees/easy/binarytree_inorder_traversal.py)                           | Trees               |\n| 129 | Binary Search Tree                                                                                                                          |                | easy       | [solution](./trees/easy/bst.py)                                                    | Trees               |\n| 130 | Inorder, Preorder, Postorder DFS                                                                                                            |                | easy       | [solution](./trees/easy/dfs.py)                                                    | Trees               |\n| 131 | [Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/)                                                                 | Leetcode #110  | easy       | [solution](./trees/easy/check_if_balanced.py)                                      | Trees               |\n| 132 | [Binary Tree Diameter](https://leetcode.com/problems/diameter-of-binary-tree/)                                                              | Leetcode #543  | easy       | [solution](./trees/easy/diameter.py)                                               | Trees               |\n| 133 | [Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/)                                                                     | Leetcode #226  | easy       | [solution](./trees/easy/invert_tree.py)                                            | Trees               |\n| 134 | [Lowest common ancestor BST](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/)                                 | Leetcode #235  | easy       | [solution](./trees/easy/lowest_common_ancestor.py)                                 | Trees               |\n| 135 | [Merge Binary Trees](https://leetcode.com/problems/merge-two-binary-trees/)                                                                 | Leetcode #617  | easy       | [solution](./trees/easy/merge_binary_trees.py)                                     | Trees               |\n| 136 | [N-ary tree preorder traversal](https://leetcode.com/problems/n-ary-tree-preorder-traversal/)                                               | Leetcode #589  | easy       | [solution](./trees/easy/n-ary_preorder.py)                                         | Trees               |\n| 137 | [Same Tree](https://leetcode.com/problems/same-tree/)                                                                                       | Leetcode #100  | easy       | [solution](./trees/easy/same_tree.py)                                              | Trees               |\n| 138 | [Sorted Array to BST](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/)                                            | Leetcode #108  | easy       | [solution](./trees/easy/sorted_array_bst.py)                                       | Trees               |\n| 139 | [BST iterator implementation](https://leetcode.com/problems/binary-search-tree-iterator/)                                                   | Leetcode #173  | medium     | [solution](./trees/medium/bst_iterator.py)                                         | Trees               |\n| 140 | [Construct Tree from Preorder and Inorder](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/)        | Leetcode #105  | medium     | [solution](./trees/medium/build_tree_preorder_inorder.py)                          | Trees               |\n| 141 | [Course Schedule](https://leetcode.com/problems/course-schedule-ii/)                                                                        | Leetcode #210  | medium     | [solution](./trees/medium/course_schedule.py)                                      | Trees               |\n| 142 | [kth smallest BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/)                                                            | Leetcode #230  | medium     | [solution](./trees/medium/kth_smallest.py)                                         | Trees               |\n| 143 | [Longest Univalue Path](https://leetcode.com/problems/longest-univalue-path/)                                                               | Leetcode #687  | medium     | [solution](./trees/medium/longest_univalue_path.py)                                | Trees               |\n| 144 | [Path Sum](https://leetcode.com/problems/path-sum-ii/)                                                                                      | Leetcode #113  | medium     | [solution](./trees/medium/path_sum.py)                                             | Trees               |\n| 145 | [Populate next perfect BST](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/)                                     | Leetcode #116  | medium     | [solution](./trees/medium/populate_next_perfect_bst.py)                            | Trees               |\n| 146 | [BST side view](https://leetcode.com/problems/binary-tree-right-side-view/)                                                                 | Leetcode #199  | medium     | [solution](./trees/medium/right_side_view.py)                                      | Trees               |\n| 147 | [Trie Implementation](https://leetcode.com/problems/implement-trie-prefix-tree/)                                                            | Leetcode #208  | medium     | [solution](./trees/medium/trie.py)                                                 | Trees               |\n| 148 | [Validate BST](https://leetcode.com/problems/validate-binary-search-tree/)                                                                  | Leetcode #98   | medium     | [solution](./trees/medium/validate_bst.py)                                         | Trees               |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclintjohnsn%2Fds-algo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclintjohnsn%2Fds-algo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclintjohnsn%2Fds-algo/lists"}