Python-Leetcode-Algorithm 第一阶段:Array, String, Math三大Topic金融类公司高频题 2018/06/16 Array: 48 easy 1. Two Sum: https://leetcode.com/problems/two-sum/description/ 26. Remove Duplicates from Sorted Array: https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/ 27. Remove Element: https://leetcode.com/problems/remove-element/description/ 35. Search Insert Position: https://leetcode.com/problems/search-insert-position/description/ 53. Maximum Subarray: https://leetcode.com/problems/maximum-subarray/description/ 66. Plus One: https://leetcode.com/problems/plus-one/description/ 88. Merge Sorted Array: https://leetcode.com/problems/merge-sorted-array/description/ 118. Pascal's Triangle: https://leetcode.com/problems/pascals-triangle/description/ 119. Pascal's Triangle II: https://leetcode.com/problems/pascals-triangle-ii/description/ 121. Best Time to Buy and Sell Stock: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/ 122. Best Time to Buy and Sell Stock II: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/description/ 167. Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/ 169. Majority Element: https://leetcode.com/problems/majority-element/description/ 189. Rotate Array: https://leetcode.com/problems/rotate-array/description/ 217. Contains Duplicate: https://leetcode.com/problems/contains-duplicate/description/ 219. Contains Duplicate II: https://leetcode.com/problems/contains-duplicate-ii/description/ 243. Shortest Word Distance: https://leetcode.com/problems/shortest-word-distance/description/ 268. Missing Number: https://leetcode.com/problems/missing-number/description/ 283. Move Zeroes: https://leetcode.com/problems/move-zeroes/description/ 414. Third Maximum Number: https://leetcode.com/problems/third-maximum-number/description/ 448. Find All Numbers Disappeared in an Array: https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/description/ 485. Max Consecutive Ones: https://leetcode.com/problems/max-consecutive-ones/description/ 532. K-diff Pairs in an Array: https://leetcode.com/problems/k-diff-pairs-in-an-array/description/ 561. Array Partition I: https://leetcode.com/problems/array-partition-i/description/ 566. Reshape the Matrix: https://leetcode.com/problems/reshape-the-matrix/description/ 581. Shortest Unsorted Continuous Subarray: https://leetcode.com/problems/shortest-unsorted-continuous-subarray/description/ 605. Can Place Flowers: https://leetcode.com/problems/can-place-flowers/description/ 624. Maximum Distance in Arrays: https://leetcode.com/problems/maximum-distance-in-arrays/description/ 628. Maximum Product of Three Numbers: https://leetcode.com/problems/maximum-product-of-three-numbers/description/ 643. Maximum Average Subarray I: https://leetcode.com/problems/maximum-average-subarray-i/description/ 665. Non-decreasing Array: https://leetcode.com/problems/non-decreasing-array/description/ 661. Image Smoother: https://leetcode.com/problems/image-smoother/description/ 674. Longest Continuous Increasing Subsequence: https://leetcode.com/problems/longest-continuous-increasing-subsequence/description/ 695. Max Area of Island: https://leetcode.com/problems/max-area-of-island/description/ 697. Degree of an Array: https://leetcode.com/problems/degree-of-an-array/description/ 717. 1-bit and 2-bit Characters: https://leetcode.com/problems/1-bit-and-2-bit-characters/description/ 724. Find Pivot Index: https://leetcode.com/problems/find-pivot-index/description/ 746. Min Cost Climbing Stairs: https://leetcode.com/problems/min-cost-climbing-stairs/description/ 747. Largest Number At Least Twice of Others: https://leetcode.com/problems/largest-number-at-least-twice-of-others/description/ 766. Toeplitz Matrix: https://leetcode.com/problems/toeplitz-matrix/description/ 830. Positions of Large Groups: https://leetcode.com/problems/positions-of-large-groups/description/ 832. Flipping an Image: https://leetcode.com/problems/flipping-an-image/description/ 840. Magic Squares In Grid: https://leetcode.com/problems/magic-squares-in-grid/description/ 849. Maximize Distance to Closest Person: https://leetcode.com/problems/maximize-distance-to-closest-person/description/ 867. Transpose Matrix: https://leetcode.com/problems/transpose-matrix/description/ 888. Fair Candy Swap: https://leetcode.com/problems/fair-candy-swap/description/ 896. Monotonic Array: https://leetcode.com/problems/monotonic-array/description/ 905. Sort Array By Parity: https://leetcode.com/problems/sort-array-by-parity/description/ String: 37 easy 13. Roman to Integer: https://leetcode.com/problems/roman-to-integer/description/ 14. Longest Common Prefix: https://leetcode.com/problems/longest-common-prefix/description/ 20. Valid Parentheses: https://leetcode.com/problems/valid-parentheses/description/ 28. Implement strStr(): https://leetcode.com/problems/implement-strstr/description/ 38. Count and Say: https://leetcode.com/problems/count-and-say/description/ 58. Length of Last Word: https://leetcode.com/problems/length-of-last-word/description/ 67. Add Binary: https://leetcode.com/problems/add-binary/description/ 125. Valid Palindrome: https://leetcode.com/problems/valid-palindrome/description/ 157. Read N Characters Given Read4: https://leetcode.com/problems/read-n-characters-given-read4/description/ 293. Flip Game: https://leetcode.com/problems/flip-game/description/ 344. Reverse String: https://leetcode.com/problems/reverse-string/description/ 345. Reverse Vowels of a String: https://leetcode.com/problems/reverse-vowels-of-a-string/description/ 383. Ransom Note: https://leetcode.com/problems/ransom-note/description/ 387. First Unique Character in a String: https://leetcode.com/problems/first-unique-character-in-a-string/description/ 408. Valid Word Abbreviation: https://leetcode.com/problems/valid-word-abbreviation/description/ 434. Number of Segments in a String: https://leetcode.com/problems/number-of-segments-in-a-string/description/ 443. String Compression: https://leetcode.com/problems/string-compression/description/ 459. Repeated Substring Pattern: https://leetcode.com/problems/repeated-substring-pattern/description/ 520. Detect Capital: https://leetcode.com/problems/detect-capital/description/ 521. Longest Uncommon Subsequence I: https://leetcode.com/problems/longest-uncommon-subsequence-i/description/ 541. Reverse String II: https://leetcode.com/problems/reverse-string-ii/description/ 551. Student Attendance Record I: https://leetcode.com/problems/student-attendance-record-i/description/ 557. Reverse Words in a String III: https://leetcode.com/problems/reverse-words-in-a-string-iii/description/ 606. Construct String from Binary Tree: https://leetcode.com/problems/construct-string-from-binary-tree/description/ 657. Judge Route Circle: https://leetcode.com/problems/judge-route-circle/description/ 680. Valid Palindrome II: https://leetcode.com/problems/valid-palindrome-ii/description/ 686. Repeated String Match: https://leetcode.com/problems/repeated-string-match/description/ 696. Count Binary Substrings: https://leetcode.com/problems/count-binary-substrings/description/ 709. To Lower Case: https://leetcode.com/problems/to-lower-case/description/ 758. Bold Words in String: https://leetcode.com/problems/bold-words-in-string/description/ 788. Rotated Digits: https://leetcode.com/problems/rotated-digits/description/ 800. Similar RGB Color: https://leetcode.com/problems/similar-rgb-color/description/ 804. Unique Morse Code Words: https://leetcode.com/problems/unique-morse-code-words/description/ 819. Most Common Word: https://leetcode.com/problems/most-common-word/description/ 824. Goat Latin: https://leetcode.com/problems/goat-latin/description/ 859. Buddy Strings: https://leetcode.com/problems/buddy-strings/description/ 893. Groups of Special-Equivalent Strings: https://leetcode.com/problems/groups-of-special-equivalent-strings/description/ Math: 34 easy 7. Reverse Integer: https://leetcode.com/problems/reverse-integer/description/ 9. Palindrome Number: https://leetcode.com/problems/palindrome-number/description/ 13. Roman to Integer: https://leetcode.com/problems/roman-to-integer/description/ 66. Plus One: https://leetcode.com/problems/plus-one/description/ 67. Add Binary: https://leetcode.com/problems/add-binary/description/ 69. Sqrt(x): https://leetcode.com/problems/sqrtx/description/ 168. Excel Sheet Column Title: https://leetcode.com/problems/excel-sheet-column-title/description/ 171. Excel Sheet Column Number: https://leetcode.com/problems/excel-sheet-column-number/description/ 172. Factorial Trailing Zeroes: https://leetcode.com/problems/factorial-trailing-zeroes/description/ 202. Happy Number: https://leetcode.com/problems/happy-number/description/ 204. Count Primes: https://leetcode.com/problems/count-primes/description/ 231. Power of Two: https://leetcode.com/problems/power-of-two/description/ 246. Strobogrammatic Number: https://leetcode.com/problems/strobogrammatic-number/description/ 258. Add Digits: https://leetcode.com/problems/add-digits/description/ 263. Ugly Number: https://leetcode.com/problems/ugly-number/description/ 268. Missing Number: https://leetcode.com/problems/missing-number/description/ 326. Power of Three: https://leetcode.com/problems/power-of-three/description/ 367. Valid Perfect Square: https://leetcode.com/problems/valid-perfect-square/description/ 400. Nth Digit: https://leetcode.com/problems/nth-digit/description/ 415. Add Strings: https://leetcode.com/problems/add-strings/description/ 441. Arranging Coins: https://leetcode.com/problems/arranging-coins/description/ 453. Minimum Moves to Equal Array Elements: https://leetcode.com/problems/minimum-moves-to-equal-array-elements/description/ 507. Perfect Number: https://leetcode.com/problems/perfect-number/description/ 598. Range Addition II:https://leetcode.com/problems/range-addition-ii/description/ 628. Maximum Product of Three Numbers: https://leetcode.com/problems/maximum-product-of-three-numbers/description/ 633. Sum of Square Numbers: https://leetcode.com/problems/sum-of-square-numbers/description/ 645. Set Mismatch: https://leetcode.com/problems/set-mismatch/description/ 728. Self Dividing Numbers: https://leetcode.com/problems/self-dividing-numbers/description/ 800. Similar RGB Color: https://leetcode.com/problems/similar-rgb-color/description/ 812. Largest Triangle Area:https://leetcode.com/problems/largest-triangle-area/description/ 836. Rectangle Overlap: https://leetcode.com/problems/rectangle-overlap/description/ 868. Binary Gap: https://leetcode.com/problems/binary-gap/description/ 883. Projection Area of 3D Shapes:https://leetcode.com/problems/projection-area-of-3d-shapes/description/ 892. Surface Area of 3D Shapes: https://leetcode.com/problems/surface-area-of-3d-shapes/description/ 第二阶段:10个topic 100道easy题 HighestFrequency Bit Manipulation: 10 easy 136. Single Number: https://leetcode.com/problems/single-number/description/ 461. Hamming Distance: https://leetcode.com/problems/hamming-distance/description/ 371. Sum of Two Integers: https://leetcode.com/problems/sum-of-two-integers/description/ 191. Number of 1 Bits: https://leetcode.com/problems/number-of-1-bits/description/ 476. Number Complement: https://leetcode.com/problems/number-complement/description/ 231. Power of Two: https://leetcode.com/problems/power-of-two/description/ 190. Reverse Bits: https://leetcode.com/problems/reverse-bits/description/ 389. Find the Difference: https://leetcode.com/problems/find-the-difference/description/ 401. Binary Watch:https://leetcode.com/problems/binary-watch/description/ 342. Power of Four: https://leetcode.com/problems/power-of-four/description/ Binary Search: 4 easy + 6 medium + 1 hard 167. Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/ 35. Search Insert Position: https://leetcode.com/problems/search-insert-position/description/ 374. Guess Number Higher or Lower: https://leetcode.com/problems/guess-number-higher-or-lower/description/ 278. First Bad Version: https://leetcode.com/problems/first-bad-version/description/ 50. Pow(x, n): https://leetcode.com/problems/powx-n/description/ 153. Find Minimum in Rotated Sorted Array: https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/description/ 33. Search in Rotated Sorted Array: https://leetcode.com/problems/search-in-rotated-sorted-array/description/ 29. Divide Two Integers: https://leetcode.com/problems/divide-two-integers/description/ 287. Find the Duplicate Number: https://leetcode.com/problems/find-the-duplicate-number/description/ 240. Search a 2D Matrix II: https://leetcode.com/problems/search-a-2d-matrix-ii/description/ 4. Median of Two Sorted Arrays: https://leetcode.com/problems/median-of-two-sorted-arrays/description/ Sort: 3 easy + 5 medium + 2 hard 242. Valid Anagram: https://leetcode.com/problems/valid-anagram/description/ 349. Intersection of Two Arrays: https://leetcode.com/problems/intersection-of-two-arrays/description/ 350. Intersection of Two Arrays II: https://leetcode.com/problems/intersection-of-two-arrays-ii/description/ 148. Sort List: https://leetcode.com/problems/sort-list/description/ 56. Merge Intervals: https://leetcode.com/problems/merge-intervals/description/ 147. Insertion Sort List: https://leetcode.com/problems/insertion-sort-list/description/ 179. Largest Number: https://leetcode.com/problems/largest-number/description/ 280. Wiggle Sort: https://leetcode.com/problems/wiggle-sort/description/ 164. Maximum Gap: https://leetcode.com/problems/maximum-gap/description/ 296. Best Meeting Point: https://leetcode.com/problems/best-meeting-point/description/ Two Pointers: 9 easy + 1 medium 141. Linked List Cycle: https://leetcode.com/problems/linked-list-cycle/description/ 26. Remove Duplicates from Sorted Array: https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/ 27. Remove Element: https://leetcode.com/problems/remove-element/description/ 234. Palindrome Linked List: https://leetcode.com/problems/palindrome-linked-list/description/ 28. 11. Container With Most Water: https://leetcode.com/problems/container-with-most-water/description/ 167. Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/ 349. Intersection of Two Arrays: https://leetcode.com/problems/intersection-of-two-arrays/description/ 345. Reverse Vowels of a String: https://leetcode.com/problems/reverse-vowels-of-a-string/description/ 125. Valid Palindrome: https://leetcode.com/problems/valid-palindrome/description/ 350. Intersection of Two Arrays II: https://leetcode.com/problems/intersection-of-two-arrays-ii/description/ Dynamic Programming: 6 easy + 4 medium + 1 hard 53. Maximum Subarray: https://leetcode.com/problems/maximum-subarray/description/ 121. Best Time to Buy and Sell Stock: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/ 70. Climbing Stairs: https://leetcode.com/problems/climbing-stairs/description/ 198. House Robber: https://leetcode.com/problems/house-robber/description/ 303. Range Sum Query - Immutable: https://leetcode.com/problems/range-sum-query-immutable/description/ 746. Min Cost Climbing Stairs: https://leetcode.com/problems/min-cost-climbing-stairs/description/ 5. Longest Palindromic Substring: https://leetcode.com/problems/longest-palindromic-substring/description/ 338. Counting Bits: https://leetcode.com/problems/counting-bits/description/ 152. Maximum Product Subarray: https://leetcode.com/problems/maximum-product-subarray/description/ 139. Word Break: https://leetcode.com/problems/word-break/description/ 10. Regular Expression Matching: https://leetcode.com/problems/regular-expression-matching/description/ Tree: 10 easy 104. Maximum Depth of Binary Tree: https://leetcode.com/problems/maximum-depth-of-binary-tree/description/ 226. Invert Binary Tree: https://leetcode.com/problems/invert-binary-tree/description/ 617. Merge Two Binary Trees: https://leetcode.com/problems/merge-two-binary-trees/description/ 100. Same Tree: https://leetcode.com/problems/same-tree/description/ 110. Balanced Binary Tree: https://leetcode.com/problems/balanced-binary-tree/description/ 235. Lowest Common Ancestor of a Binary Search Tree: https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/description/ 108. Convert Sorted Array to Binary Search Tree: https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/description/ 669. Trim a Binary Search Tree: https://leetcode.com/problems/trim-a-binary-search-tree/description/ 101. Symmetric Tree: https://leetcode.com/problems/symmetric-tree/description/ 257. Binary Tree Paths: https://leetcode.com/problems/binary-tree-paths/description/ Hash Table: 10 easy 771. Jewels and Stones: https://leetcode.com/problems/jewels-and-stones/description/ 463. Island Perimeter: https://leetcode.com/problems/island-perimeter/description/ 219. Contains Duplicate II: https://leetcode.com/problems/contains-duplicate-ii/description/ 242. Valid Anagram: https://leetcode.com/problems/valid-anagram/description/ 760. Find Anagram Mappings: https://leetcode.com/problems/find-anagram-mappings/description/ 500. Keyboard Row: https://leetcode.com/problems/keyboard-row/description/ 387. First Unique Character in a String: https://leetcode.com/problems/first-unique-character-in-a-string/description/ 204. Count Primes: https://leetcode.com/problems/count-primes/description/ 205. Isomorphic Strings: https://leetcode.com/problems/isomorphic-strings/description/ 290. Word Pattern: https://leetcode.com/problems/word-pattern/description/