Remeber few days ago, I was using BFS for tree traveral layer by layer, We initilize the levels = [], and for each layer of tree, we add another level. we use queue = deque([root,]) and while queue is not empty, we continue the loop. We use the lengh of...
[Read More]
Do You Know You Suck at Tree Question???
There are two general strategies to traverse a tree *Depth First Search(DFS) In this strategy, we adopt the depth as the priority, so that one can start from the top and reach all the way down to certain left. We can further discuss preorder, inorder, postorder. *Breadth First Search(BFS) We...
[Read More]
Summary of my interview experience
Time to look back
It is always important to look back and seek improvement of yourself. I am the person who love to record my baby steps. It is been ten days since I updated my blog. Before I jumped into my technical memory. I need to confess that I had a crunsh on...
[Read More]
Potential linked-list Question
Two-pointer Technique
When I am preparing my technical interview, I see the importance of array(with strings inside).
Remove Duplicate without using extra space
[Read More]