LeetCode Solutions in Python My solutions to LeetCode problems. Count # Problem Solution 1 20 Valid Parentheses Python 2 21 Merge Two Sorted Lists Python 3 27 Remove Element Python 4 70 Climbing Stairs Python 5 74 Search a 2D Matrix Python 6 155 Min Stack Python 7 206 Reverse Linked List Python 8 206 Reverse Linked List (Recursive) Python 9 225 Implement Stack using Queues Python 10 374 Guess Number Higher or Lower Python 11 485 Max Consecutive Ones Python 12 682 Baseball Game Python 13 704 Binary Search Python 14 707 Design Linked List Python 15 875 Koko Eating Bananas Python 16 1299 Replace Elements with Greatest Element on Right Side Python 17 1472 Design Browser History Python 18 1700 Number of Students Unable to Eat Lunch Python 19 1929 Concatenation of Array Python 20 2235 Add Two Integers Python 21 912 Sort an Array Python 22 88 Merge Sorted Array Python 23 75 Sort Colors Python 24 23 Merge k Sorted Lists Python 25 973 K Closest Points to Origin Python 26 701 Insert into a Binary Search Tree Python 27 94 Binary Tree Inorder Traversal Python 28 110 Balanced Binary Tree Python 29 230 Kth Smallest Element in a BST Python 30 102 Binary Tree Level Order Traversal Python 31 199 Binary Tree Right Side View Python 32 105 Construct Binary Tree from Preorder and Inorder Traversal Python 33 450 Delete Node in a BST Python 34 217 Contains Duplicate Python 35 1 Two Sum Python 36 242 Valid Anagram Python 37 146 LRU Cache Python 38 112 Path Sum Python 39 78 Subsets Python 40 39 Combination Sum Python 41 733 Flood Fill Python 42 200 Number of Islands Python 43 695 Max Area of Island Python 44 1091 Shortest Path in Binary Matrix Python 45 994 Rotting Oranges Python 46 344 Reverse String Python 47 125 Valid Palindrome Python 48 680 Valid Palindrome II Python 49 1768 Merge Strings Alternately Python 50 26 Remove Duplicates from Sorted Array Python 51 167 Two Sum II - Input Array Is Sorted Python 52 169 Majority Element Python 53 219 Contains Duplicate II Python 54 14 Longest Common Prefix Python 55 49 Group Anagrams Python 56 35 Search Insert Position Python 57 69 Sqrt(x) Python 58 198 House Robber Python 59 62 Unique Paths Python 60 63 Unique Paths II Python 61 1143 Longest Common Subsequence Python 62 133 Clone Graph Python 63 703 Kth Largest Element in a Stream Python 64 1046 Last Stone Weight Python 65 973 K Closest Points to Origin (Heap) Python 66 215 Kth Largest Element in an Array Python 67 207 Course Schedule Python 68 11 Container With Most Water Python 69 150 Evaluate Reverse Polish Notation Python 70 232 Implement Queue using Stacks Python 71 141 Linked List Cycle Python 72 121 Best Time to Buy and Sell Stock Python 73 136 Single Number Python 74 144 Binary Tree Preorder Traversal Python 75 145 Binary Tree Postorder Traversal Python 76 226 Invert Binary Tree Python 77 104 Maximum Depth of Binary Tree Python 78 543 Diameter of Binary Tree Python 79 100 Same Tree Python 80 268 Missing Number Python 81 67 Add Binary Python 82 867 Transpose Matrix Python 83 202 Happy Number Python 84 66 Plus One Python 85 73 Set Matrix Zeroes Python 86 168 Excel Sheet Column Title Python 87 2807 Insert Greatest Common Divisors in Linked List Python 88 572 Subtree of Another Tree Python 89 53 Maximum Subarray Python 90 303 Range Sum Query - Immutable Python 91 724 Find Pivot Index Python 92 1991 Find the Middle Index in Array Python 93 304 Range Sum Query 2D - Immutable Python 94 238 Product of Array Except Self Python 95 876 Middle of the Linked List Python 96 1343 Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold Python