Overview

Starting 12/06/2017, a diary for solving LeetCode problems.


  • 1/22 Mon (2, 154) *****
  1. 31 Next Pemutation

  • 1/21 Sun (3, 152) *****
  1. 24 Swap Nodes in Pairs
  2. 25 Reverse Nodes in k-Group
  3. 29 Divide Two Integers
  4. 30 Substring with Concatenation of All Words

  • 1/20 Sat (4, 149) *****
  1. 17 Letter Combinations of a Phone Number
  2. 18 4Sum
  3. 19 Remove Nth Node From End of List
  4. 23 Merge k Sorted Lists ---first self conquered Hard, Whooray!

  • 1/19 Fri (5, 145) *****
  1. 11 Container With Most Water
  2. 12 Integer to Roman
  3. 15 3Sum
  4. 16 3Sum Closest

  • 1/18 Thu (3, 140) *****
  1. 5 Longest Palindromic Substring
  2. 6 ZigZag Conversion
  3. 8 String to Integer (atoi)
  4. 10 Regular Expression Matching

  • 1/17 Wed (1, 137) *****
  1. 4 Median of Two Sorted Arrays

  • 1/16 Tue (3, 136) ***** strategy change, focus on the 1-400 for now
  1. 22 Generate Parentheses
  2. 2 Add Two Numbers
  3. 3 Longest Substring Without Repeating Characters

  • 1/15 Mon (1, 133)
  1. 384 Shuffle an Array

  • 1/12 Fri (1, 132)
  1. 421 Maximum XOR of Two Numbers in an Array

  • 1/11 Thu (5, 131)
  1. 503 Next Greater Element II
  2. 454 4Sum II
  3. 648 Replace Words
  4. 646 Maximum Length of Pair Chain
  5. 382 Linked List Random Node

  • 1/10 Wed (3, 126)
  1. 725 Split Linked List in Parts
  2. 94 Binary Tree Inorder Traversal
  3. 477 Total Hamming Distance

  • 1/9 Tue (3, 123)
  1. 547 Friend Circles
  2. 347 Top K Frequent Elements
  3. 672 Bulb Switcher II

  • 1/8 Mon (3, 120)
  1. 529 Minesweeper
  2. 565 Array Nesting
  3. 655 Print Binary Tree

  • 1/7 Sun (3, 117)
  1. 451 Sort Characters By Frequency
  2. 238 Product of Array Except Self
  3. 676 Implement Magic Dictionary

  • 1/4 Thu (1, 114)
  1. 712 Minimum ASCII Delete Sum for Two Strings

  • 1/3 Wed (5, 113)
  1. 609 Find Duplicate File in System
  2. 677 Map Sum Pairs
  3. 462 Minimum Moves to Equal Array Elements II
  4. 495 Teemo Attacking
  5. 667 Beautiful Arrangement II

  • 1/2 Tue (3, 108)
  1. 526 Beautiful Arrangement
  2. 739 Daily Temperatures
  3. 260 Single Number III

  • 1/1 Mon Happy New Year (5, 105)
  1. 540 Single Element in a Sorted Array
  2. 647 Palindrome Substrings
  3. 515 Find Largest Value in Each Tree Row
  4. 748 Shortest Completing Word
  5. 413 Arithmetic Slices
  6. 526 Beautiful Arrangement

  • 12/31 Sun (5, 100)
  1. 537 Complex Number Multiplication
  2. 419 Battleships in a Board
  3. 338 Counting Bits
  4. 442 Find All Duplicates in an Array
  5. 406 Queue Reconstruction by Height

  • 12/30 Sat (3, 95)
  1. 665 Non-decreasing Array
  2. 535 Encode and Decode TinyURL
  3. 654 Maximum Binary Tree

  • 12/29 Fri (5, 92)
  1. 204 Count Primes
  2. 278 First Bad Version
  3. 189 Rotate Array
  4. 479 Largest Palindrome Product
  5. 7 Reverse Integer

  • 12/28 Thu (10, 87)
  1. 155 Min Stack
  2. 475 Heaters
  3. 190 Reverse Bits
  4. 581 Shortest Unsorted Continuous Subarray
  5. 28 Implement strStr()
  6. 69 Sqrt(x)
  7. 532 K-diff Pairs in an Array
  8. 414 Third Maximum Number
  9. 168 Excel Sheet Column Title
  10. 125 Valid Palindrome

  • 12/27 Wed (6, 77)
  1. 58 Length of Last Word
  2. 14 Longest Common Prefix
  3. 303 Range Sum Query - Immutable
  4. 160 Intersection of Two Linked Lists
  5. 605 Can Place Flowers
  6. 400 Nth Digit

  • 12/26 Tue (5, 71)
  1. 203 Remove Linked list Elements
  2. 219 Contains Duplicate II
  3. 680 Valid Palindrome II
  4. 633 Sum of Square Numbers
  5. 88 Merger Sorted Array

  • 12/25 Mon, Merry Christmas (2, 66)
  1. 290 Word Pattern
  2. 234 Palindrome Linked list

  • 12/24 Sun (4, 64)
  1. 20 Valid Parentheses
  2. 225 Implement Stack using Queues
  3. 67 Add Binary
  4. 507 Perfect Number

  • 12/23 Sat (1, 60)
  1. 438 Find All Anagrams in a String

  • 12/22 Fri (7, 59)
  1. 374 Guess Number Higher or Lower
  2. 38 Guess Number Higher or Lower
  3. 26 Remove Duplicates from Sorted Array
  4. 9 Palindrome Number
  5. 141 Linked List Cycle
  6. 205 Isomorphic Strings
  7. 686 Repeated String Match

  • 12/21 Thu (10, 52)
  1. 53 Maximum Subarray
  2. 645 Set Mismatch
  3. 198 House Robber
  4. 643 Maximum Average Subarray I
  5. 119 Pascal's Triangle II
  6. 232 Implement Queue using Stacks
  7. 443 String Compression
  8. 434 Number of Segments in a String
  9. 172 Fractorial Trailing Zeroes
  10. 1 Two Sum

  • 12/20 Wed (1, 42)
  1. 36 Valid Sudoku
  2. 37 Sudoku Solver -- Not done

  • 12/18 Mon (5, 41)
  1. 628 Maximum Product of Three Numbers
  2. 674 Longest Continuous Increasing Subsequence
  3. 482 License Key Formatting
  4. 724 Find Pivot Index
  5. 720 Longest Word in Dictionary

  • 12/17 Sun (2, 36)
  1. 599 Mininmum Index Sum of Two Lists
  2. 661 Image Smoother

  • 12/16 Sat (1, 34)
  1. 697 Degree of an Array

  • 12/15 Fri (3, 33)
  1. 513 Find Bottom Left Tree Value
  2. 508 Most Frequent Subtree Sum
  3. 116 Populating Next Right Pointers in Each Node

Finished all easy tree problems. Change topic tomorrow.


  • 12/14 Thu (7, 30)
  1. 235 Lowest Common Ancestor of a Binary Search Tree
  2. 563 Binary Tree Tilt
  3. 572 Subtree of Another Tree
  4. 104 Maximum Depth of Binary Tree
  5. 606 Construct String from Binary Tree
  6. 617 Merge Two Binary Trees
  7. 101 Symmetric Tree

  • 12/13 Wed (4, 23)
  1. 543 Diameter of Binary Tree
  2. 112 Path Sum
  3. 111 Minimum Depth of Binary Tree
  4. 110 Balacned Binary Tree

  • 12/12 Tue (2, 19)
  1. 501 Find Mode in Binary Search Tree
  2. 671 Second Minimum Node In a Binary Tree

  • 12/11 Mon (5, 17)
  1. 107 Binary Tree Level Order Traversal II
  2. 226 Invert Binary Tree
  3. 257 Binary Tree Paths
  4. 404 Sum of Left Leaves
  5. 437 Path Sum III

  • 12/10 Sun (3, 12)
  1. 653 Two Sum IV - Input is a BST
  2. 637 Average of Levels in Binary Tree
  3. 100 Same Tree

  • 12/09 Sat (1, 9)
  1. 669 Trim a Binary Search Tree

  • 12/08 Fri (2, 8)
  1. 538 Convert BST to Greater Tree
  2. 687 Longest Univalue Path
  • Made a pathetic solution, big room for improvement

  • 12/07 Thu (5, 6)
  1. 383 Ransom Note
  2. 169 Majority Element
  3. 404 Sum of Left Leaves
  4. 455 Assign Cookies
  5. 687 Longest Univalue Path
  • Unfinished, I need to get more comfortable with trees.

  • 12/06 Wed (1, 1)
  1. 349 Intersection of Two Arrays