Python Algorithms Training Basic¶
Python Algorithms Training Basic
written by sean base on following books
Github | https://github.com/newsteinking/High_pythonalgorithms_training_basic
- chapter 1: Array
- Array - Easy
- 1.Two Sum
- 27.Remove Element
- 35.Search Insert Position
- 53.Maximum Subarray
- 66.Plus One
- 88. Merge Sorted Array
- 88.2 Merge Sorted Array 2
- 118. Pascal's Triangle
- 118.2 Pascal's Triangle
- 118.3 Pascal's Triangle 3
- 119. Pascal's Triangle 2
- 121. Best Time to Buy and Sell Stock
- 122. Best Time to Buy and Sell Stock 2
- 167. Two Sum 2
- 169. Majority Element
- 189. Rotate Array
- 217. Contains Duplicate
- 219. Contains Duplicate 2
- 268. Missing Number
- 283. Move Zeroes
- 414. Third Maximum Number
- 448. Find All Numbers Disappeared in Array
- 485. Max Consecutive Ones
- 532. K-diff Pairs in an Array
- 561. Array Partition 1
- 566. Reshape the Matrix
- 581. Shortest Unsorted Continuous Subarray
- Array - Easy 2
- Array - Medium
- Array - Hard
- Array - Easy
- chapter 2: Backtracking
- chapter 3: Binary Search
- BinarySearch - Easy
- 4. Median of two sorted arrays
- 33. Search In Rotated Sorted Array
- 34. Search for a range
- 35. Search In Position
- 69. sqrtx
- 74. Search a 2D matrix
- 81. Search In rotated sorted array 2
- 153. find minimum in rotated sorted array
- 154. find minimum in rotated sorted array 2
- 162. find peak element
- 222. count complete tree nodes
- 230. Kth smallest element in a bst
- 275. H index 2
- 278. First Bad Version
- 367. Valid perfect square
- 378. kth smallest element in a sorted matrix
- BinarySearch - Medium
- BinarySearch - Hard
- BinarySearch - Easy
- chapter 4: Bit manipulation
- chapter 5: Breadth First Search
- chapter 6: Combination
- chapter 7: Depth First Search
- chapter 8: DFA
- chapter 9: DivideConquer
- chapter 10: Dynamic Programming
- chapter 11: Graph
- chapter 12: Greedy
- chapter 13: Hash table
- Hash table - Easy
- 1. Two Sum
- 136. Single Number
- 202. Happy Number
- 204. Count Primes
- 205. Isomorphic Strings
- 217. Contains Duplicate
- 219. Cotains Duplicate 2
- 242. Valid Anagram
- 290. Word Pattern
- 349. Intersection of Two Arrays
- 350. Intersection of Two Arrays 2
- 389. Find the Difference
- 409. Longest Palindrome
- 438. Find All Anagrams in a String
- 447. Number of Boomerangs
- 463. Island Perimeter
- 575. Distribute Candies
- 594. Longest Harmonious Subsequence
- 599. Minimum Index Sum of Two Lists
- Hash table - Easy 2
- Hash table - Medium
- Hash table - Hard
- Hash table - Easy
- chapter 14: Heap
- chapter 15: Linked List
- chapter 16: Math
- chapter 17: Others
- Math - Easy
- 66. Plus One
- 168. Excel Sheet Column Title
- 171. Excel Sheet Column Number
- 172. Factorial Trailing Zeroes
- 202. Happy Number
- 204. Count Primes
- 231. Power of Two
- 258. Add Digits
- 268. Missing Number
- 367. Valid Perfect Square
- 441. Arranging Coins
- 453. Minimum Moves to Equal Array Elements
- 598. Range Addition 2
- Math - Easy 2
- 12 Integer to Roman
- 13. Roman to Integer
- 43. Multiply Strings
- 48. Rotate Image
- 50. powx-n
- 60. Permutation Sequence
- 166. Fraction to Recurring Decimal
- 179. Largest Number
- 223. Rectangle Area
- 233. Number of Digit One
- 238. Product of array except self
- 273. Integer to English
- 292. Nim Game
- 319. bulb switcher
- 326. Power of three
- 335. Self Crossing
- 343. Integer Break
- Math - Medium
- Math - Hard
- Math - Easy
- chapter 18: Recursion
- chapter 19: Stack
- chapter 20: String
- Stack - Easy
- 20. Valid Parentheses
- 32. Longest Valid Parentheses
- 71. Simplify Path
- 84. Largest Rectangle in Histogram
- 85. Maximal Rectangle
- 94. Binary tree inorder traversal
- 150. Evaluate Reverse Polish notation
- 155. Min Stack
- 1224. Basic Caculator
- 225. Implement stack using queues
- 227. Basic Calculator 2
- 232. Implement queue using stacks
- 316. Remove duplicate letters
- 341. Flatten nested list iterator
- Stack - Medium
- Stack - Hard
- Stack - Easy
- chapter 21: ToBeOptimized
- String - Easy
- 5. Longest palindromic substring
- 6. Zigzag Conversion
- 8. String to integer atoi
- 14. Longest Common Prefix
- 17. Letter combination of a phone number
- 28. Implement StrStr
- 38. Count and Say
- 58. Length of Last word
- 67. Add Binary
- 68. Text Justification
- 151. Reverse words in a string
- 165. Compare version numbers
- 344. Reverse String
- String - Medium
- String - Hard
- String - Easy
- chapter 22: Tree
- chapter 23: Two Pointers
- Tree - Easy
- 94. Binary Tree inorder traversal
- 95. Unique Binary Search Trees 2
- 96. Unique Binary Search Trees
- 99. Recover Binary Search Tree
- 100. Same Tree
- 105. Contruct binary tree from preorder and inorder traversal
- 106. Construct binary tree from inorder and preorder traversal
- 108. Convert Sorted array to binary search tree
- 109. Convert sorted list to binary search tree
- 110. Balanced binary tree
- 111. Minimum depth of binary tree
- 112. Path sum
- 113. Path sum 2
- 114. Flatten binary tree to linked list
- 116. Populating next right pointers in each node
- 117. populating next right pointers in each node 2
- 124. Binary tree maximum path sum
- 144. Binary tree preorder traversal
- 145. Binary Tree postorder traversal
- 173. Binary Search tree iterator
- 208. Implement trie prefix
- 211. Add and Search word data Structure design
- 226. Invert Binary tree
- 235. Lowest common ancestor of a binary search
- 236. Lowest common ancestor of a binary tree
- 297. Serialize and deserialize binary tree
- 331. Verify preorder serialization of a binary tree
- Tree - Medium
- Tree - Hard
- Tree - Easy