Skip to content

Latest commit

 

History

History

Leetcode discussion

It takes a village to raise a child.

Sept. 9, 2018
I like to adapt the culture to learn from and contribute to Leetcode discuss community. It is a long journey.

It took more than 3 years five months for me to understand that I also should learn to contribute to the community, I like to make the community better for learning and sharing, encouraging each other to share ideas. From January 2015, I started to work on Leetcode algorithm, three years 6 months later, July 2018 is time for me to be a writer for Leetcode discuss.

This page is dedicated to show my effort to provide a feature to review all my past practice, all my sharing on Leetcode discuss.

I am the one

Since I am working on target to solve first 300 algorithm on Leetcode.com, I like to solve as many algorithms as possible. So it will take me some time to work on Leetcode discuss, specially on Leetcode easy level tree algorithms. I like to review those algorithms first and then I will write something to share for each algorithm.

Leetcode discuss

I will share more practice later. I also will add those links I shared before.

Sept. 9, 2018

Leetcode.com does not provide product feature to look up discuss shared by a player. Google search result will only show at most 20 results of my discuss.

Google search: Leetcode leetcode jianmin.chen.39

Here is the link.

Sept. 13, 2018

I like to list all my sharings on Tree easy level algorithms, Array easy level algorithms, Math easy level algorithms.

Total sharing 96 (Oct. 5, 2018)
Total sharing 188 (Nov. 28, 2018) Easy level 122, Medium level 57, hard level 9
I will keep the statistics update here:
My post on Leetcode.com discuss in detail

May 28, 2019
I also put together a page to list all practice in 2019. Here is the link.

Welcome to visit all my 2019 practice on Leetcode.com. Here is the link.

Tree easy level algorithms (solved 30, shared 5)

437. Path Sum III
501. Find Mode in Binary Search Tree
590. N-ary tree postorder traversal
671. Second minimum node in a binary tree
687. Longest univalue path optimal solution
687. Longest univalue path with design flaw, pass 43 out of 68 test cases
687. Longest univalue path copy the idea from most popular post
687. Longest univalue path learn from a mock interview
687. Longest univalue path C# post order - check with parent value with step by step illustration
687. Longest Univalue Path various topics covered in practice from 2018 to 2019
687. Longest Univalue Path C# brute force on every node for cross path with detail explanation practice in 2019

993 Cousins in binary tree


Array easy level algorithms (solved 44, shared 24)

53: Maximum subarray
119: Pascal's triangle II Naive one
119: Pascal's triangle II Optimal one
169. Majority element
189. Rotate the array
219. Contains Duplicate II
414. The third maximum number
485. Max Consecutive Ones
448. Find All Numbers Disappeared in an Array
566. Reshape the Matrix
624. Maximum distance in arrays I will study the blog and write one.
628: Maximum product of three numbers
661: Image smoother
665. Non-decreasing array
695. Max Area of Island
717. 1-bit and 2-bit characters
724. Find pivot index
746: Min cost climbing stairs
766. Toeplitz Matrix
830: Positions of large groups
832. Flipping an Image
840. Magic Squares In Grid
867. Transpose matrix - pass 29/36 test cases
888. Fair Candy Swap
896. Monotonic Array
917. Reverse Only Letters
930. Binary subarrays with sum code written in the weekly contest 108
941. Valid Mountain Array
965. Univalued Binary Treecode written in weekly contest 117
973 K Cloest points to origin written after the weekly contest 119
976 Largest perimeter triangle kind of greedy
977. Squares of a Sorted Array Solution written in contest 120
997. Find town judge
1018. Binary Prefix Divisible By 5 solution written in contest 130
1033. Moving Stones Until Consecutive took me 40 minutes to solve in the weekly contest
1037. Valid Boomerang 34 minutes for an easy algorithm
1089. Duplicate Zeros C# trial and error practice in weekly contest 141

Math easy level algorithms (solved 27/ 32, shared 12)

7. Reverse integer
9. Palindrome number
168. Excel Sheet Column Title
172: Factorial trailing zeroes
367. Valid Perfect Square
400. Nth Digit
415. Add Strings recursive version - memory limit exceeded
415. Add Strings Iterative solution - learn to use for loop creatively
441. Arranging Coins
453. Minimum Moves to Equal Array Elements
507. Perfect number
598. Range Addition II
633. Sum of square numbers
836. Rectangle Overlap
868 binary gap

String easy level algorithms (solved 32, shared 15)

14. Longest Common Prefix
38. Count and Say
345. Reverse Vowels of a String 1 upvote!
434. Number of Segments in a String
443. String Compression use count variable to avoid backward lookup
443. String Compression My idea -look ahead and backward
443. String Compression Elegant solution to learn
459. Repeated Substring Pattern
680. Valid Palindrome II Optimal solution
680. Valid Palindrome II 418/460 test cases passed Time limit exceeded
686. Repeated String Match memory limit exceeded for last test case
686. Repeated String Match memory limit exceeded for last test case
788. Rotated digits dynamic programming
788. Rotated digits using two hashset to help
788. Rotated digits use HashSet.IsSubsetOf
859. Buddy Strings
893. Groups of Special-Equivalent Strings
925. Long pressed name code written in contest
925. Long pressed name Elegant solution learned after the contest
929. Unique email addresses
942. DI string match
1002. Find common characters
1071. Greatest Common Divisor of Strings brute force solution missed in weekly contest
Hashtable easy level algorithm (solved 25, shared 21)

1. Two Sum
136. Single Number using XOR (1 upvote)
204. Count Primes verbose code
204. Count Primes elegant version
205. Isomorphic Strings
219. Contains Duplicate II
242. Valid Anagram One more mistake to remind me to work on easy level
290. Word Pattern
350. Intersection of Two Arrays II
389. Find the Difference using XOR
409. Longest Palindrome
438. Find All Anagrams in a String
447. Number of Boomerangs
463. Island Perimeter
500. Keyboard Row do it myself
500. Keyboard Row use HashSet API IsSubsetOf
575. Distribute Candies Need to work on my reading skills
594. Longest Harmonious Subsequence
599. Minimum Index Sum of Two Lists
645. Set Mismatch first submission - XOR
645. Set Mismatch elegant one using XOR two places
645. Set Mismatch use bit manipulation trick
705. Design HashSet
706. Design HashMap Use fix size of space determined by upper bound
720. Longest Word in Dictionary use hashset
720. Longest Word in Dictionary use Trie data structure
720. Longest Word in Dictionary use Trie data structure
720. Longest Word in Dictionary use Queue data structure
720. Longest Word in Dictionary use recursive function

Easy level stack algorithm (solved 7/7, shared 7)
20. Valid parentheses
155. Min Stack
225. Implement stack using queues
232. Implement queue using stacks
496. Next great element II
682. Baseball game
844. Backspace string compare

Easy level backtracking
401. Binary watch bit manipulation and recursive
401. Binary watch recursive and kind of verbose
784. Letter case permutation backtracking algorithm iterative solution
784. Letter case permutation recursive solution

Easy level linked list
21. Merge two sorted lists problem statement?
83. Remove duplicates from sorted list memorable experience
141. Linked list cycle two pointers will meet, one step a time/ two steps a time
160. Intersection of two linked lists length comparison
203. Remove linked list elements
206. Reverse linked list
234. Palindrome linked list July 2018 for phone screen
237. Delete a node in a linked list Fail to come out idea by myself
707. Design linked list
876. Middle of the linked list

Easy level unspecified
970. Powerful Integers
994 Rotten oranges

Medium level linked list
19. Remove Nth node from end of the list
24. Swap nodes in pairs
82. Remove Duplicates from Sorted List II
86. Partition list dummy heads and two lists
92. Reverse linked list II
138. Copy list with random pointer The elegant solution
143. Reorder the list
147. Insertion sort list hard to write but is readable
148. Sort the list Merge sort
328. Odd even linked list
445. Add two numbers II
725. Split Linked List in Parts Failed more than three submissions
817. Linked list components using hashset

Medium level (solved 53, shared 20)

18. 4 Sum 1 upvote
56. Merge intervals C# First success submission back in May 2017
56. Merge intervals C# IComparer class definition practice in February 2017
63. Unique Paths II dynamic programming
Leetcode 75: Sort Colors the optimal time complexity solution
91. Decode Ways Code written in 2018
91. Decode Ways Code written in 2019
109. Convert sorted list to binary search tree
127. Word Ladder C# BFS practice in 2019
127. Word Ladder C# BFS practice back I in June 2016
127. Word Ladder C# BFS practice back II in June 2016

130. Surrounded Regions Will share later
241 Different Ways To Add Parentheses practice in 2019 May - a Google interview algorithm
399. Evaluate Division learn from C# code written in 2017
402. Remove K digits optimal solution using stack
402. Remove K digits brute force solution
402. Remove K Digits C# Ideas I practice in 2019
402. Remove K Digits C# slide window and bucket sort practice in 2019
684. Redundant Connection union find using array
684. Redundant Connection using Dictionary<Int, HashSet>
785. Is Graph Bipartite? Run depth first search to visit all nodes and edges in the graph
785. Is Graph Bipartite? union find algorithm
915. Partition Array into Disjoint Intervals use three iterations
915. Partition Array into Disjoint Intervals one pass idea discuss
916. Word Subsets using counting sort
916. Word Subsets discuss
918. Maximum Sum Circular Subarray pass 98/108, in the contest
918. Maximum Sum Circular Subarray after the contest, working code
919. Complete Binary Tree Inserter O(1) insert
919. Complete Binary Tree Inserter Using Queue
919. Complete Binary Tree Inserter Using Queue
923. 3Sum With Multiplicity
923. 3Sum With Multiplicity dynamic programming solution (1 upvote on Oct. 18, 2018; 3 upvotes Dec.18, 2018)
926. Flip string to monotone increasing
944. Delete columns to make sorted
945. Minimum Increment to Make Array Unique
946. Validate Stack Sequences
947. Most Stones Removed with Same Row or Column Partial of union find algorithm
947. Most Stones Removed with Same Row or Column Apply depth first search in a graph

947. Most Stones Removed with Same Row or Column Practice 3

948. Bag of Tokens
958. Check Completeness of a Binary Tree
967. Numbers With Same Consecutive Differences
969. Pancake Sorting
974. Subarray Sums Divisible by K
978. Longest Turbulent Subarray solution written in contest
1020. Number of Enclaves written in contest 130
1023. Camelcase Matching written in the contest 131
1023. Camelcase Matching solution learned after the contest
1024. Video stitiching greedy algorithm on sorted array
1031. Maximum Sum of Two Non-Overlapping Subarrays painful experience documented in my own blog first

1034. Coloring A Border using DFS, mark visited and color change
1035. Uncrossed Lines dynamic programming solution using List
1073. Adding Two Negabinary Numbers C# so many trial and error in my first practice

1073. Adding Two Negabinary Numbers Use stack to remove leading zero
1073. Adding Two Negabinary Numbers learn to use next two bit to carry
1091. Shortest Path in Binary Matrix C# breadth first search practice in 2019

1090. Largest Values From Labels C# Try to solve using greedy algorithm practice in 2019

Medium level tree algorithms (solved 37, total 39, shared 29)
94. Binary Tree Inorder Traversal using stack
94. Binary Tree Inorder Traversal use recursive function
95. Unique Binary Search Trees II
96. Unique Binary Search Trees
98. Validate Binary Search Tree
102. Binary Tree Level Order Traversal submitted in 2015
102. Binary Tree Level Order Traversal submitted in 2018
105. Construct Binary Tree from Preorder and Inorder Traversal
106. Construct Binary Tree from Inorder and Postorder Traversal
113. Path Sum II
114. Flatten Binary Tree to Linked List
129. Sum Root to Leaf Numbers
173. Binary Search Tree Iterator
199. Binary Tree Right Side View
222. Count Complete Tree Nodes(1 upvote on Dec. 18, 2018)
230. Kth Smallest Element in a BST
235. Lowest Common Ancestor of a Binary Tree binary search in BST
236. Lowest Common Ancestor of a Binary Search Tree time out using string, need help
236. Lowest Common Ancestor of a Binary Search Tree time out using list, need help
236. Lowest Common Ancestor of a Binary Search Tree optimal solution bottom up with reasoning
236. Lowest Common Ancestor of a Binary Search Tree various topics covered through 2019 practice
337. House Robber III
449. Serialize and Deserialize BST
450. Delete Node in a BST
652. Find Duplicate Subtrees
662. Maximum Width of Binary Tree
654. Maximum binary tree
684. Redundant Connection union find using array
684. Redundant Connection using Dictionary<Int, HashSet>
701 Insert into a binary search tree
814 binary tree pruning
863. All Nodes Distance K in Binary Tree

958. Check Completeness of a Binary Tree
958. Check Completeness of a Binary Tree
958. Check Completeness of a Binary TreeUse index sum to check completeness
971. Flip Binary Tree To Match Preorder Traversal
971. Flip Binary Tree To Match Preorder Traversal How to push myself to write an elegant solution?
987. Vertical Order Traversal of a Binary Tree study code from a casual coder
987. Vertical Order Traversal of a Binary Tree C# leetcode online judge for C# test case is problematic
998. Maximum binary tree II
1008. Construct a BST using preorder Using extra space to avoid bugs
1008. Construct a BST using preorder C# code written in weekly contest
1008. Construct a BST using preorder How to write an elegant solution>
1008. Construct a BST using preorder Write a linear time complexity solution - optimal time
1038. Binary Search Tree to Greater Sum Tree How two small mistakes drag down my performance to 50 minutes

Medium level stack algorithms (solved 2, total 18, shared 2)
503. Next Greater Element II Work on optimal time complexity O(N) solution
739. Daily Temperatures
856. Score of Parentheses
1003. Check if word is valid after substitutions
1019. Next Greater Node In Linked List written in weekly contest 130

Medium level union find algorithm
721. Accounts merge Union find algorithm

1202. Smallest String With Swaps
C# union find algorithm practice in 2019

Hard level (solved 33, shared 5)

37. Sudoku Solver
37. Sudoku Solver One more elegant solution
42. Trapping Rain Water C# First success submission back in May 2018
76. Minimum Window Substring One thing a time
85. Maximal Rectangle
July 3, 2019
97. Interleaving String C# dynamic programming practice in August, 2018
239. Sliding Window Maximum optimal solution using LinkedList
239. Sliding Window Maximum All submissions, SortedSet, timeout
297. Serialize and Deserialize Binary Tree First practice in December, 2018
301. Remove Invalid Parentheses 1 upvotes!
301. Remove Invalid Parentheses 3 upvotes
301. Remove Invalid Parentheses
LeetCode 675. Cut Off Trees for Golf Event code written in one hour mock interview passed first half test cases
329. Longest Increasing Path in a Matrix C# depth first search and memoization classical algorithm
927. Three equal parts Take me more than one hour (1 upvote Nov. 2, 2018)

980. Unique Paths III backtracking algorithm
996. Number of squareful arrays
996. Number of squareful arraysLearn from a casual coder, 3 upvotes(May 1, 2019)
1000. minimum cost to merge stones top down dynamic programming - memoization
1000. minimum cost to merge stones dynamic programming - bottom up - How to hack one?
1015. None repeat digit number count Study code from ranking No. 1 in weekly contest 128
1015. None repeat digit number count standard depth first search back tracking technique

1074. Number of Submatrices That Sum to Target write code first and then figure out what is the idea
Hard level tree algorithms (solved 5 out 6 unlocked algorithms, shared 1)

145. Binary Tree Postorder Traversal My practice, using hashset to mark visited
145. Binary Tree Postorder Traversal idea I learned as interviewer
145. Binary Tree Postorder Traversal idea I learned from Taras comment from a casual coder blog
146. LRU Cache May 2019 pass 12/ 18 test cases
March 21, 2019
1012. Numbers With Repeated Digits C# Study code from ranking No. 1 in weekly contest 128 (4 upvotes up to Oct. 8, 2019)
1012. Numbers With Repeated Digits C# standard depth first search with back tracking (1 upvotes up to Oct. 8, 2019)

My favorite algorithms
Union Find algorithm
947 remove stone I spent one week in 2019 March on this union find algorithm. Here are the folder to contain my code study.
947 remove stone C# Use partial of union find algorithm to solve the problem
947 remove stone C# apply depth first search in a graph
I will spend time to share those solutions on Leetcode.com one by one.
Please wait.

My own blogs

Leetcode 437
Leetcode 501

June 8 - 10, 2019
1079. Letter Tile Possibilities C# various topics covered in my practice in 2019
1079. Letter Tile Possibilities C# learn to write a solution after the weekly contest on June 8, 2019
1079. Letter Tile Possibilities C# counting sort and depth first search to count unique substrings practice in 2019
1079. Letter Tile Possibilities C# case study "AAB" to figure out the solution in 2019
1081. Smallest Subsequence of Distinct Characters C# using stack and also counting sort
1080. Insufficient Nodes in Root to Leaf Paths C# code could not pass large test case in weekly contest
1078. Occurrences After Bigram C# One iteration of parsed words

June 17, 2019
1091. Shortest Path in Binary Matrix C# breadth first search practice in 2019
1090. Largest Values From Labels C# Try to solve using greedy algorithm practice in 2019
1089. Duplicate Zeros C# trial and error practice in weekly contest 141

June 12 - 18
377. Combination Sum IV

Recursive solution with timeout issue, here is the link.
Dynamic programming, top down, memoization, here is the link.
Dynamic programming, bottom up, here is the link.

  1. Shortest Path in Binary Matrix
    C# breadth first search practice in 2019
    Here is the link.

  2. Largest Values From Labels
    C# Try to solve using greedy algorithm practice in 2019

July 4, 2019
I went over discuss on Leetcode.com, and then had chance to review my past practice; I quickly wrote posts to share my past practice as well.
88. Merge Sorted Array

C# first practice back in August 2018

212 Word search II

C# First practice using Trie in 2017

C# practice using Trie and good explanation in detail
C# Using Trie with a case study practice in January 2018

  1. Insert Interval
    C# First practice in 2017
    C# Sort intervals using start time first practice in 2017

  2. Implement strStr()

C# KMP algorithm practice in 2015

July 15, 2019
76. Minimum Window SubstringC# slide window template study code practice in 2019

August 22, 2019
33. Search in Rotated Sorted Array
C# modified binary search practice on August 22, 2019

August 23, 2019
Various ideas to practice in 2019. Here is the link.
Time Line: 2019 August 20 Onsite interview, whiteboard version with bugs on August 20, 2019, California, MPK, here is the link.

Time Line: 2019 August 22 Optimal solution, avoid middle - 1 or middle + 1, practice on August 22, 2019. Here is the link.

Time Line: 2019 August 23 Work on idea to define left half [start, middle - 1], practice on August 23, 2019. here is the link. Time Line: 2017 My practice in 2017. Here is the link.

Time Line: 2017 Common mistakes in binary search is my favorite research topic in 2017. Here is the blog.

My mock interview practice in 2017, here is the blog with source code link in the blog as well.

126. Word Ladder II

C# Time limit exceeded practice in 2019
C# creative idea to create a graph and then construct shortest path map practice in 2019

simple version:
Find all paths from given start word and end word, also a dictionary of words to connect, one char to change every step.

Brute force solution - using DFS - Sept. 2019

  1. Minimum Absolute Difference
    C# Sort the array and then find the minimum

Oct. 21 - Oct. 25, 2019
1170. Compare Strings by Frequency of the Smallest Character C# Sort first and then get count of smallest character
985. Sum of Even Numbers After Queries C# Using dynamic programming to track sum of even numbers
1128. Number of Equivalent Domino Pairs C# Learn from three failed test cases
999. Available Captures for Rook C# work on directions and also boundary check carefully
1122. Relative Sort Array C# Good learning experience
509. Fibonacci Number C# optimal time and space complexity
1160. Find Words That Can Be Formed by Characters C# Counting sort technique
1051. Height Checker C# Solve 60 easy level algorithms - No 1 of 60

Oct. 29, 2019
1238. Circular Permutation in Binary Representation Design algorithm using DFS similar to Sudoku solver
989. Add to Array-Form of Integer C# Learn IEnumerable Skip and Take API
989. Add to Array-Form of Integer C# iterative solution
1239. Maximum Length of a Concatenated String with Unique Characters C# A solution with readable code using DFS

Nov. 4, 2019
1247. Minimum Swaps to Make Strings Equal C# learn from two test cases
1248. Count Number of Nice Subarrays C# - preprocess the array first

Nov. 12, 2019
1103. Distribute Candies to People C# Work on basics - while loop

Nov. 24, 2019
239. Sliding Window Maximum C# mock interview performance with code review in 2019
117. Populating Next Right Pointers in Each Node II C# using level by level traversal practice in 2019
69. Sqrt(x) C# binary search practice with challenges in 2019

Nov. 24, 2019
124. Binary Tree Maximum Path Sum C# mock interview practice on Nov 24, 2019
207. Course Schedule C# mock interview practice on Nov. 24, 2019
210. Course Schedule II C# mock interview practice on Nov 24, 2019

Phone screen: 输入是”123456789”,可以在任意位置加上多个+或-的运算符,最后结果要是100。输出所有的可能组合。简单的dfs题。比如”123-45-67+89 = 100”
Here

2020 - I put all my practice in another page.
2020 practice

January 2, 2020

"There is no way around the hard work. Embrace it." Roger Federer

I like to encourage myself to solve 240 algorithms in first six months of 2020. I know that I am super busy with full time work, and also I like to catch up learning system design as a senior programmer. But I do believe that I will become a better problem solver if I choose to work on easy level algorithms every day, and every Saturday I play weekly contest as well.

To push myself hard, I need to solve 40 algorithms in one month, and I like to work on it six months. So I can complete 240 algorithms in six months.

July 2017
516. Longest Palindromic Subsequence C# dynamic programming practice in 2017

Jan. 8 2020
1249. Minimum Remove to Make Valid Parentheses C# First practice in 2020

Jan. 13, 2020
419. Battleships in a Board Plan to work on

Jan. 14, 2020
402. Remove K Digits C# brute force solution written for mock interview on January 13, 2020

402. Remove K Digits C# brute force solution with backtracking practice in 2020

Jan. 15, 2020
402. Remove K Digits C# work with brute force solution to enumerate all possible combinations k digits

Feb. 9, 2020
987. Vertical Order Traversal of a Binary Tree C# Optimal time complexity linear time in 2020

March 1, 2020
322 coin change My practice back in June 2019

958. Check Completeness of a Binary Tree C# Learning experience as an interviewer on March 1, 2020

March 2, 2020 10:00 PM mock interview as an interviewer
958. Check Completeness of a Binary Tree A 30 minutes mock interview study

53. Maximum Subarray C# work on prefix sum

53. Maximum Subarray C# Having fun to work on easy level algorithm practice in 2020

March 4, 2020
692. Top K Frequent Words C# Apply two data structures: SortedDictionary and SortedSet

March 10, 2020
994. Rotting Oranges C# start from each rotten orange to apply BFS approach - more work
practice time: Feb. 2019
994. Rotting Oranges C# Check fresh orange nodes by four neighbors all the time

practice time: March 10, 2020
994. Rotting Oranges C# discussion how to choose less error-prone mapping function - rows + columns

994. Rotting Oranges C# Having fun to practice more ideas in 2020

May 26, 2020
236. Lowest Common Ancestor of a Binary Tree
May 1, 2020
C# Postorder traversal and count nodes found practice in 2020 Learn idea from ex-facebook engineer
May 25, 2020
C# Tuple<TreeNode, int> design talk and quick practice in May 25 2020 First warmup
C# Tuple<TreeNode, int> design talk and second practice on May 25 2020 Second practice to warmup

May 26, 2020
236. Lowest Common Ancestor of a Binary Tree
C# Find path from root to p practice on May 26, 2020 Backtracking preorder traversal
C# Critic my own code written on May 7, 2019Critic my own code written on May 7 2019

  1. Third Maximum Number
    2018 August 15
    414. Third Maximum Number C# solution using SortedSet
    2020 June 2
    414. Third Maximum Number C# SortedSet and minimum heap warm up practice in June 2020

June 3, 2020
414. Third Maximum Number
2018 August 15
C# work on basics practice on August 15 2018
C# solution using SortedSet
2020 June
C# SortedSet and minimum heap warm up practice in June 2020
C# My practice showcase in 2020

June 4, 2020
C# post order - check parent node and compare warmup practice in June 2020

June 11, 2020
C# minimum heap - walk through an example practice on June 2020

  1. Kth Largest Element in an Array

C# SortedDictionary minimum heap practice in 2020

C# SortedDictionary minimum heap practice II in June 2020

23 minimum Heap - merge k sorted lists

August 11, 2018
C# solution using minimum heap
July 14, 2019
C# Using SortedDictionary
2015 August
C# merge two lists idea practice in August 2015

June 15, 2020 4. Median of Two Sorted Arrays
C# warmup practice on June 15, 2020
C# review my practice in June 2018

Trie data structure

I also like to build a show case based on data structure - Trie

212 - Word search II
C# Trie showcase starting from 2018
C# Trie data structure DFS algorithm practice in June 2020
June 16, 2020
C# Trie design challenge and DFS algorithm practice in June 2018

  1. Add Strings
    Problem statement
    Given two nonnegative integer numbers as string, calculate sum of two numbers.

Sept 15, 2018
C# my first practice has stack overflow issue on Sept 15 2018
C# iterative solution using a for loop
C# Warmup practice on June 17, 2020
C# My showcase of practice starting from Sept. 2018

June 22, 2020
720. Longest Word in Dictionary
C# My showcase of practice starting from August 2018
C# Level order traversal to search all possible words practice in 2020

[301. Remove Invalid Parentheses]
June 22, 2020
C# BFS warmup practice in 2020
June 23, 2020
BFS algorithm - keep minimum steps to make it work first
C# BFS approach without pruning practice in June 2020
C# My showcase of practice starting from 2017

June 24, 2020
208. Implement Trie (Prefix Tree)
C# Trie algorithm practice in June 2020

  1. Permutations
    C# DFS algorithm with backtracking practice on June 2020

  2. Populating Next Right Pointers in Each Node
    C# tree level by level order traversal practice in June 2020

  3. Longest Substring Without Repeating Characters
    C# slide window optimal time algorithm practice in June 2020
    C# My showcase of learning starting from 2015 April

  4. Longest Substring Without Repeating Characters
    2020 June 24
    C# slide window optimal time algorithm practice in June 2020 Two nested loop
    2020 June 25
    C# warmup practice in June 25 2020
    One loop

  5. Find First and Last Position of Element in Sorted Array
    C# binary search algorithm practice on June 26, 2020

C# binary search algorithm showcase starting from August 2018

June 26, 2020
688. Knight Probability in Chessboard
C# mock interview practice with time limit exceeded problem in June 2020
June 29, 2020
84. Largest Rectangle in Histogram
C# Review my first practice in June 2018
C# My showcase of problem solving starting from June 2018
C# Showcase how to solve the problem starting from 2015
How to analyze the problem starting from brute force solution?

June 29, 2020
382. Linked List Random Node
C# mock interview practice on June 29 2020

  1. Linked List Random Node
    C# mock interview practice on June 29 2020

  2. Find Pivot Index
    C# mock interview practice on June 29, 2020

  3. Minimum Index Sum of Two Lists
    C# mock interview practice on June 29, 2020

  4. Regular expression matching
    Case study: dynamic programming solution with a bug on March 29, 2018
    Case study: dynamic programming solution on January 26, 2018
    C# My showcase of practice starting from 2017

July 2, 2020
911. Online Election
C# mock interview practice on July 2 2020

July 3, 2020

124 Maximum path sum
Showcase how I learn to solve in 15 minutes starting from 2015
2019 Nov.25
Mock interview practice with insights
2019 May 27
C# post order traversal and then design a recursive function to return root to leaf path max value
2016 August 4
2016 practice - need improvements
C# code review practice in July 2015
C# code review practice in July 2015
C# code review practice in August 2016

July 3, 2020
438. Find All Anagrams in a String
C# using counting sort
Add a case study - take 10 minutes to write a case study how to approach the problem.

Most frequent asked algorithms from Facebook phone screen: https://www.1point3acres.com/
973, 314, 238, 438, 227, 523, 953, 670, 145, 463, 145, 953, 124, 47, 435

  1. Permutations II
    C# DFS backtracking unique key practice on July 3, 2020

July 6 2020
961. N-Repeated Element in Size 2N Array
C# ugly code written in mock interview on July 6 2020
C# using hashset practice in January 2019
C# Elegant solution written after mock interview on July 6, 2020

  1. Subdomain Visit Count
    C# review my practice in May 2019
    C# Mock interview practice on July 6 2020

  2. Search in Rotated Sorted Array II
    C# binary search algorithm with compromise edge case July 6 2020

  3. Cousins in Binary Tree
    C# mock interview practice on July 6, 2020

  4. Search in Rotated Sorted Array II
    C# binary search algorithm with compromise edge case July 6 2020

  5. Cousins in Binary Tree
    C# mock interview practice on July 6, 2020
    C# review my practice in March 2019

July 7, 2020
1027. Longest Arithmetic Sequence
C# mock interview practice with TLE bug practice on July 7, 2020

  1. Check Completeness of a Binary Tree
    C# mock interview practice on July 7, 2020

  2. Next Greater Element II
    July 8, 2020
    C# mock interview case study with a bug on July 8, 2020
    C# Fix the bug in my mock interview on July 8 2020
    July 10, 2019
    C# work on O(N) time complexity solution

July 8, 2020
1146. Snapshot Array
C# Mock interview practice on July 8 2020

  1. First Bad Version
    C# binary search practice on July 8, 2020
    C# review binary search practice in August 2018

July 4, 2020
C# mock interview case study practice on July 4 2020

  1. Frog Jump
    C# dynamic programming makes perfect
    C# dynamic programming - similar to BFS timeout issue

July 10, 2020
1080 Insufficient Nodes in Root to Leaf Paths
C# Three test cases to help using post order traversal

2020 July 10
C# It took me 85 minutes to make it work in mock interview
2019 June 8, 2019
C# code could not pass large test case in weekly contest
It is so challenge for me to push myself one week to prepare 2020 July 20 Facebook phone screen.

July 13, 2020
733. Flood Fill
C# Breadth first search practice on July 13, 2020

  1. Minimum Area Rectangle
    July 13, 2020
    C# brute force solution based on top left corner
    Dec. 2018
    C# review my practice in Dec. 2018
    Dec. 2018
    C# Review time limit exceeded practice in Dec. 2018

July 14, 2020
328. Odd Even Linked List
C# LinkedList challenge
142. Linked List Cycle II
C# Fast and slow two runners practice on July 14, 2020

July 17, 2020
1376. Time Needed to Inform All Employees
C# Optimal solution using stack

July 18, 2020
979. Distribute Coins in Binary Tree
Distribute Coins in Binary Tree

  1. Knight Dialer
    C# Need to move fast

July 19, 2020
Leetcode discuss: 332. Reconstruct Itinerary

  1. Range Sum Query 2D - Immutable
    C# preprocess matrix to calculate left top corner area

  2. Decode String
    C# Stack is helpful to parse nested

4 more mock interviews on interviewing.io as an interviewee. One mock interview from a friend this coming Saturday.
Count down three days. Party is over for phone screen! Chao! (Mexico goodbye!)

Also I will start to work on algorithms on leetcode mock interview phone screen nonstop for two days.
I will plan to work on 10 to 20 algorithms a day. I need to get ideas how to improve myself in terms of problem solving.

July 20, 2020
8:00 AM - 11:00 AM Review tree algorithms on Leetcode.com. Start from hard level, finished over 20 tree algorithms.
106. Construct Binary Tree from Inorder and Postorder Traversal
C# Review my own code

  1. Sum of Distances in Tree (Hard level)
    C# code review practice in January 2019

  2. Exclusive Time of Functions
    C# My first practice with problem understanding requirement

July 20, 2020
205. Isomorphic Strings
C# Understand Isomorphic strings

July 17 - 20, 2020 Weekend code marathon is here.
Say goodbye to Facebook phone screen. Here is the blog.

August 14, 2020
76. Minimum Window Substring
C# using extra map to help track sliding window
C# Work on easy level algorithms first

August 21, 2020
1530. Number of Good Leaf Nodes Pairs
C# Find root to leaf node path using 0 and 1 two digit string

August 25, 2020
1372 Longest ZigZag Path in a Binary Tree
C# preorder traversal with optimal space and time complexity

August 28, 2020
105 Construct Binary Tree from Preorder and Inorder Traversal
C# optimal time complexity is important

August 31, 2020
1261. Find Elements in a Contaminated Binary Tree
C# Using HashSet to get O(1) time complexity to lookup

  1. All Elements in Two Binary Search Trees
    C# preorder traversal of binary search tree and then merge two sorted list

  2. Sum of Nodes with Even-Valued Grandparent
    C# Apply level order traversal and also enqueue a node and it's parent and grandparent

  3. Deepest Leaves Sum
    C# Apply level order traversal and calculate sum of each level nodes

  4. Find a Corresponding Node of a Binary Tree in a Clone of That Tree
    C# preorder traversal the original tree and find target

  5. Construct Binary Tree from Preorder and Postorder Traversal
    C# Find right subtree root node in postorder traversal list

Sept. 15, 2020
146. LRU Cache
Using C# LinkedList and LinkedListNode two classes
C# double linked list and hashmap two data structures to play roles

Sept. 22, 2020
146. LRU Cache
C# Double linked list using dummy head and tail


42. Trapping Rain Water
C# | Quick learner | Two solutions to share