Algorithms Interview Practice Basic – Breathe First Traversal In the iterative way You can only do breathe first traversal in iterative way. Though you can still make it recursive by calling itself in each loop, but you will not benefit from

git Interview Practice Basic – Depth First Traversal There are 4 ways to do a depth first traversal, depends on how you would like to do it. .gist table { margin-bottom: 0; }

app Interview Practice Extra 07 - Universal Value Binary Tree Question Design an algorithm to verify that a tree is a universal value binary tree. Universal value binary tree means all value in that tree is the same. Solution There is two approach

app Interview Practice Extra 03 - Verify Binary Tree with Same Value Question Verify whether all nodes have the same value in a binary tree. Solution We can traverse the tree with our usual way, like depth-first or breadth-first algorithm. Then pass a value, probably

app Interview Practice 16 - Print Binary Tree Layer-by-layer Question Print a binary tree layer-by-layer from top to bottom, and from left to right for each layer. Solution Yes, it’s a simple task. We can use breadth-first search, and which means

app Interview Practice 15 - Mirror Image of Binary Tree Question Construct 2 algorithms to make mirror image of any binary tree inputs, one of them using recursive method, another one using looping method. Mirror image means a binary tree that is the

binary Interview Practice 11 - Greatest Distance Between Two Nodes in Binary Tree Question Get the greatest distance between two nodes in a binary tree. Assume links between nodes are bidirectional. Distance is defined as the amount of nodes connected along the path linked two nodes.

binary Interview Practice 09 - Verify Post-order Sequence of BST Question Construct an algorithm to verify if a set of numbers is the post-order search result of a binary search tree. Let the figure at the right hand side as an example, the

binary Interview Practice 01 - Convert Binary Tree into Doubly Linked List Question Convert binary search tree into doubly linked list. It’s required not to create any new node, but only turning pointers. Solution The following shows the concept of this question. 8 / 6

auth Ssh with password saved Ssh is a very convenient way to remotely command or control other devices. We use ssh to push commits to git server, to access remote server, and even to manipulate the content of