Wangyy·Mar 20, 2021Leetcode 38: Count and SayLet’s solve a medium problem together on Leetcode.com: Count and Say
Wangyy·Mar 14, 2021How to flatten a binary tree to a linked list: recursion approachData structures such as binary trees, linked lists are frequently asked in a technical interview. Sometimes, interviewees are asked to…
Wangyy·Mar 4, 2021Merge Sort a linked listSorting algorithms are frequently asked during a technical interview. Several common sorting algorithms such as quicksort, selection sort…
Wangyy·Feb 19, 2021Max area of the island: dfs and bfs approachFor the given island that’s represented in a matrix of 0's and 1's, we usually use a depth-first search or a breadth-first search…
Wangyy·Feb 12, 2021Solve the sliding window maximum problemThe sliding window algorithm is often used to find the target number in a string/list. Today, I’ll introduce how to solve this leetcode…A response icon1A response icon1
Wangyy·Feb 5, 2021Implement a Trie in PythonWe know tree well, a binary search tree performs well in searching. Today, I’ll introduce another tree-like data structure, which is…A response icon1A response icon1
Wangyy·Jan 30, 2021Crack the house robber problemMy previous post introduced the Knapsack problem. It states how to solve using the dynamic programming algorithm. Besides Knapsack…
Wangyy·Jan 24, 2021Intro to dynamic programming knapsack problemsDynamic programming problems are frequently asked in a tech interview. For me, dynamic programming problems are challenging to understand…
Wangyy·Jan 17, 2021Deal with subset, permutation, combination problems using backtracking algorithmIt’s often asked during a technical interview: write a function to get the subsets/combinations/permutations for a given set. These…