Monday, March 16, 2020

Binary tree & Hash table

Binary tree & Hash table

Binary tree

In simple term, each node have 1 branch atleast and maximum of 2 branches. The "father" is the first node, and continuing on the branch is the next node which contains either more or less value in either ascending or descending order. If ascending order, the bigger value will go to the right branch and in descending order vice versa. After each node, it will repeat for each branch to have another branch and it will keep repeating until its over.
BINARY TREE VISUALIZED
2 is the "father" and it will keep branching out

Hash table

Datas are kept in array format, every value have their own assigned index value. If we have the index value we can find the data more easily.
HASH TABLE VISUALIZED

No comments:

Post a Comment