Sunday, 13 March 2016

Tree - Week 8

This week, the lectures were about the binary trees which are connected through nodes(linked lists).
                                       
Here the root is node 8, which has 2 children, node 3 and node 10, which have 2 and 1 children respectively and so on.

The lectures also covered the height, Arity(maximum branching factor), depth of the tree and other functions such as the different ways of traversing the tree, like LevelOrder, PreOrder, PostOrder, InOrder.

The labs weren't that hard as it was basically counting the leaves of the tree(nodes with no children) which was to be done through recursion.

No comments:

Post a Comment