# Leetcode

2019 / 03 / 06

- March 6th
- 75 Sort Colors: review
- 215 Kth Largest Element in an Array: review
- 347 Top K Frequent Elements: review

- March 7th
- 11 Container With Most Wate(Medium):
**interesting** - 42 Trapping Rain Water (Hard)
- 407 Trapping Rain Water II (Hard) :
**unsolved** - 238 Product of Array Except Self (Medium):
**good idea in solution** - 152 Maximum Product Subarray (Medium):
*DP* - 628 Maximum Product of Three Numbers (Easy):
*Consider nonpositive integers*

- 11 Container With Most Wate(Medium):
- March 9th
- 717 1-bit and 2-bit Characters (Easy)
- 9 Palindrome Number (Easy):
**improved** - 168 Excel Sheet Column Title (Easy):
**wrong easily** - 67 Add Binary (Easy)

- March 10th
- Weekly Contest 127
- 111 Minimum Depth of Binary Tree (Easy)
- 709 To Lower Case (Easy)
- 908 Smallest Range I (Easy)
- 119 Pascal’s Triangle II (Easy)

- March 11th
- 205 Isomorphic Strings (Easy)
- 263 Ugly Number (Easy)
- 231 Power of Two (Easy)
- 342 Power of Four (Easy)
- 258 Add Digits (Easy)
- 278 First Bad Version (Easy)
- 383 Ransom Note (Easy)
- 292 Nim Game (Easy)
- 414 Third Maximum Number (Easy)
- 509 Fibonacci Number (Easy)
- 485 Max Consecutive Ones (Easy)
- 605 Can Place Flowers (Easy)
- 643 Maximum Average Subarray I (Easy)
- 1002 Find Common Characters (Easy)

- March 12th
- 697 Degree of an Array (Easy):
**hard** - 746 Min Cost Climbing Stairs (Easy):
**DP** - 867 Transpose Matrix (Easy)
- 832 Flipping an Image (Easy)
- 905 Sort Array By Parity (Easy)
- 922 Sort Array By Parity II (Easy)

- 697 Degree of an Array (Easy):
- March 13th
- 95 Unique Binary Search Trees II (Medium):
**review** - 17 Letter Combinations of a Phone Number (Medium):
**recursion** - 441 Arranging Coins (Easy):
**BS**

- 95 Unique Binary Search Trees II (Medium):
- March 14th
- 367 Valid Perfect Square (Easy):
**BS** - 507 Perfect Number (Easy)
- 598 Range Addition II (Easy)
- 633 Sum of Square Numbers (Easy):
**hard**,**good solution**

- 367 Valid Perfect Square (Easy):
- March 15th
- 400 Nth Digit (Easy):
**bug++** - 661 Image Smoother (Easy)
- 724 Find Pivot Index (Easy):
**bug++**,**negative number**

- 400 Nth Digit (Easy):
- March 16th
- 47 Permutations II (Medium):
**citation** - 90 Subsets II (Medium)
- 131 Palindrome Partitioning (Medium):
**hard**, “tuning”

- 47 Permutations II (Medium):
- March 17th
- Weekly Contest 128

- March 18th
- 1015 Numbers With Repeated Digits (hard):
**hard**,**review**

- 1015 Numbers With Repeated Digits (hard):
- March 19th
- 79 Word Search (Medium):
**DFS** - 687 Longest Univalue Path (Easy):
**recursion** - 504 Base 7 (Easy)
- 453 Minimum Moves to Equal Array Elements (Easy):
**hard** - 561 Array Partition I (Easy)
- 754 Reach a Number (Easy):
**hard** - 200 Number of Islands (Medium):
**DFS** - 566 Reshape the Matrix (Easy)
- 977 Squares of a Sorted Array (Easy)
- 130 Surrounded Regions (Medium):
**DFS**

- 79 Word Search (Medium):
- March 20th
- 942 DI String Match (Easy)
- 914 X of a Kind in a Deck of Cards (Easy):
**hard****TBD** - 868 Binary Gap (Easy)
- 892 Surface Area of 3D Shapes (Easy):
**hard**,*concave*,**TBD**

- March 22nd
- 655 Non-decreasing Array (Easy)
- 747 Largest Number At Least Twice of Others (Easy)
- 896 Monotonic Array (Easy)
- 674 Longest Continuous Increasing Subsequence (Easy)
- 888 Fair Candy Swap (Easy)
- 941 Valid Mountain Array (Easy)
- 961 N-Repeated Element in Size 2N Array (Easy)

- March 23rd
- 852 Peak Index in a Mountain Array (Easy)
- 162 Find Peak Element (Easy)
- 1 Two Sum (Easy):
**improve** - 999 Available Captures for Rook (Easy)
- 349 Intersection of Two Arrays (Easy)
- 985 Sum of Even Numbers After Queries (Easy)

- March 24th
- Weekly Contest 127
- 1021 Best Sightseeing Pair (Medium):
**hard** - 1022 Smallest Integer Divisible by K (Easy):
**interesting**,*prove?* - Weekly Contest 114 (Virtual)
- 955 Delete Columns to Make Sorted II (Medium):
**TBD** - 956 Tallest Billboard (hard):
**TBD**

- March 25th
- Weekly Contest 97 (Virtual)
- 886 Possible Bipartition (Medium):
**UnionFind** - 887 Super Egg Drop (hard):
**interesting**,**TBD** - 445 Add Two Numbers II (Medium)

- March 26th
- 100 Same Tree (Easy)
- 110 Balanced Binary Tree (Easy)
- 532 K-diff Pairs in an Array (Easy)

- March 29th
- 401 Binary Watch (Easy):
**recursion**

- 401 Binary Watch (Easy):
- March 30th
- 645 Set Mismatch (Easy):
**trick** - 542 Reverse String II (Easy)
- 345 Reverse Vowels of a String (Easy)
- 557 Reverse Words in a String III (Easy)

- 645 Set Mismatch (Easy):
- March 31st
- Weekly Contest 130
- 2 Add Two Numbers (Medium)
- 3 Longest Substring Without Repeating Characters (Medium)

- April 4th
- 290 Word Pattern (Easy)
- 415 Add Strings (Easy)
- 989 Add to Array-Form of Integer (Easy)

- April 5th
- 804 Unique Morse Code Words (Easy)
- 724 Self Dividing Numbers (Easy)
- 883 Projection Area of 3D Shapes (Easy)
- 933 Number of Recent Calls (Easy)
- 917 Reverse Only Letters (Easy)
- 824 Goat Latin (Easy)

- April 6th
- 796 Rotate String (Easy):
**interesting**,**KMP**

- 796 Rotate String (Easy):
- April 7th
- Weekly Contest 131
- 257 Binary Tree Paths (Easy)

- April 8th
- Weekly Contest 110 (Virtual)
- 939 Minimum Area Rectangle (Medium):
**hard**,**TBD** - 940 Distinct Subsequences II (hard):
**hard**,**TBD**

- April 10th
- 98 Validate Binary Search Tree (Medium)

- April 11th
- 501 Find Mode in Binary Search Tree (Easy)
- 4 Median of Two Sorted Arrays (hard):
**interesting**,**BS**,**TBD** - 213 House Robber II (Medium):
**hard****TBD**

- April 12th
- 5 Longest Palindromic Substring (Medium):
**interesting**,**Manachel** - 700 Search in a Binary Search Tree (Easy)

- 5 Longest Palindromic Substring (Medium):
- April 17th
- 55 Jump Game (Medium):
**Greedy** - 45 Jump Game II (hard):
**Greedy**

- 55 Jump Game (Medium):
- April 19th
- Weekly Contest 132 (Virtual)

- April 20th
- 455 Assign Cookies (Easy)
- 914 X of a Kind in a Deck of Cards (Easy)
- 442 Find All Duplicates in an Array (Medium):
**good solution** - 41 First Missing Positive (hard):
**interesting** - 765 Couples Holding Hands (hard):
**hard**,**interesting**,**UnionFind** - 690 Employee Importance (Easy)

- April 21st
- Weekly Contest 133
- 134 Gas Station (Medium):
**interesting**

- April 28th
- Weekly Contest 134
- Escape a Large Maze (hard):
**TBD**

- May 1st
- Weekly Contest 118 (Virtual)
- 96 Unique Binary Search Trees (Medium):
**DP** - 520 Detect Capital (Easy)
- 560 Subarray Sum Equals K (Medium):
**interesting**, O(n)

- May 4th
- 62 Unique Paths (Medium)
- 63 Unique Paths II (Medium)

- May 6th
- 720 Longest Word in Dictionary (Easy):
**queue**,**DFS** - Weekly Contest 135 (Virtual)
- 1039 Minimum Score Triangulation of Polygon (Medium):
**DP**,**interesting** - 1040 Moving Stones Until Consecutive II (Medium):
**interesting**,**sliding window**

- 720 Longest Word in Dictionary (Easy):
- May 7th
- 416 Partition Equal Subset Sum (Medium):
**0-1 bag problem**,**DFS**,**BFS**

- 416 Partition Equal Subset Sum (Medium):
- May 12th
- 33 Search in Rotated Sorted Array (Medium)
- Weekly Contest 136:
**TODO**

- May 20th
- 6 ZigZag Conversion (Medium):
**direct** - 12 Integer to Roman (Medium):
**direct** - 36 Valid Sudoku (Medium):
**check directly** - 22 Generate Parentheses (Medium):
**recursion** - 74 Search a 2D Matrix (Medium):
**binary search** - 240 Search a 2D Matrix II:
**interesting** - 654 Maximum Binary Tree (Medium):
**interesting**,**recursion**,**direct**

- 6 ZigZag Conversion (Medium):
- May 23th
- 807 Max Increase to Keep City Skyline (Medium):
**direct** - 701 Insert into a Binary Search Tree (Medium)
- Weekly Contest 137 (Virtual)
- 1048 Longest String Chain (Medium):
**hard**,**DP**,**DFS**(well),**BFS**

- 807 Max Increase to Keep City Skyline (Medium):
- May 24th
- 404 Sum of Left Leaves (Easy):
**recursion**

- 404 Sum of Left Leaves (Easy):
- May 26th
- Weekly Contest 138
- 788 Rotated Digits (Easy)

- June 2nd
- Weekly Contest 139
- 1074 Number of Submatrices That Sum to Target (hard):
**hard**

- June 7th
- Weekly Contest 124 (Virtual)
- 996

- June 9th
- Weekly Contest 140

- June 23rd
- Weekly Contest 142 (TODO)

- June 27th
- 107 Binary Tree Level Order Traversal II (Easy):
**BFS**

- 107 Binary Tree Level Order Traversal II (Easy):
- June 28th
- 934 Shortest Bridge (Medium):
**interesting**,**BFS** - 621 Task Scheduler (Medium):
**interesting**

- 934 Shortest Bridge (Medium):
- June 29th
- 695 Max Area of Island (Medium):
**DFS** - 338 Counting Bits (Medium):
**DP** - 983 Minimum Cost For Tickets (Medium):
**DP**

- 695 Max Area of Island (Medium):
- June 30th
- 300 Longest Increasing Subsequence (Medium):
**DP****O(nlogn)** - Weekly Contest 143
- 821 Shortest Distance to a Character (Easy)

- 300 Longest Increasing Subsequence (Medium):
- July 1st
- 91 Decode Ways (Medium):
**DP**,**recursion**(slow)

- 91 Decode Ways (Medium):
- July 6th
- 48 Rotate Image (Medium): four part
- 1072 Flip Columns For Maximum Number of Equal Rows (Meidum): to key

- July 7th
- Weekly Contest 144
- 1096 Brace Expansion II (hard): TODO

- July 11th
- 409 Longest Palindrome (Easy):
**hash table** - 907 Sum of Subarray Minimums (Medium):
**interesting**

- 409 Longest Palindrome (Easy):
- August 3th
- 551 Student Attendance Record I (Easy)

- August 4th
- Weekly Contest 148
- 324 Wiggle Sort II (Medium)

- August 11th
- Weekly Contest 149

- August 13th
- 513 Find Bottom Left Tree Value (Medium):
**Tree travesal**

- 513 Find Bottom Left Tree Value (Medium):
- August 16th
- Weekly Contest 150

- August 17th
- 84 Largest Rectangle in Histogram (hard):
**stack**,**left/right clost min/max**

- 84 Largest Rectangle in Histogram (hard):
- August 21st
- 138 Copy List with Random Pointer (Medium):
**interesting**

- 138 Copy List with Random Pointer (Medium):
- August 22nd
- 86 Partition List (Medium):
**Link**

- 86 Partition List (Medium):
- August 23rd
- 82 Remove Duplicates from Sorted List II (Medium):
**Link** - 92 Reverse Linked List II (Medium):
**Link** - 136 Reorder List (Medium):
**Link**

- 82 Remove Duplicates from Sorted List II (Medium):
- August 24th
- 29 Divide Two Integers (Medium):
**bits op** - 113 Path Sum II (Medium):
**Tree**,**DFS** - 116 Populating Next Right Pointers in Each Node (Medium):
**tree**,**BFS** - 117 Populating Next Right Pointers in Each Node II (Medium):
**tree**,**BFS**

- 29 Divide Two Integers (Medium):
- August 25th
- Weekly Contest 151
- 173 Binary Search Tree Iterator (Medium):
**tree**,**inorder travesal**

- August 26th
- 239 Sliding Window Maximum (hard):
**priority queue**,**sliding max**,**dqueue**

- 239 Sliding Window Maximum (hard):
- August 19th
- 236 Lowest Common Ancestor of a Binary Tree (Medium):
**stack**,**recursion**

- 236 Lowest Common Ancestor of a Binary Tree (Medium):
- September 13th
- 877 Stone Game (Medium):
**DP**,**Mathematical** - Weekly Contest 137 (Vritual)

- 877 Stone Game (Medium):
- September 14th
- 857 Minimum Cost to Hire K Workers (hard):
**PQ** - 475 Heaters (Medium)

- 857 Minimum Cost to Hire K Workers (hard):
- September 30th
- 458 Poor Pigs (hard):
**math**(m+1)^n - 899 Orderly Queue (hard):
**math**

- 458 Poor Pigs (hard):
- October 9th
- 552 Student Attendance Record II (Medium):
**math**,**DP**

- 552 Student Attendance Record II (Medium):
- October 13th
- Weekly Contest 158

- October 23th
- 726 Number of Atoms (hard):
**recursion**

- 726 Number of Atoms (hard):
- October 27th
- Weekly Contest 160

- October 31th
- 640 Solve the Equation (Medium):
**string**

- 640 Solve the Equation (Medium):
- November 2nd
- 454 4Sum II (Medium):
**hash table**

- 454 4Sum II (Medium):
- November 3rd
- Weekly Contest 161

- November 4th
- Biweekly Contest 12 (Virtual)
- 563 Binary Tree Tilt (Easy):
**recursion**

- November 5th
- 870 Advantage Shuffle (Medium):
**sort** - 235 Lowest Common Ancestor of a Binary Search Tree (Easy):
**recursion** - 153 Find Minimum in Rotated Sorted Array (Medium):
**binary search** - 312 Burst Balloons (hard):
**DP**

- 870 Advantage Shuffle (Medium):