/Tree-exercises

Solving some tree exercises

Primary LanguageC

Tree-exercises

Description:

Practising trees by solving some exercises

First task

is how to create a tree using linked list by creating two fuctions:

  • create_root: creates the root of tree

  • insert_child: add nodes to this root

Second task

is how to traverse a tree using 3 types of it:

  • infixe: traverse from left, root, right

  • prefixe: // // root, let, right

  • postfixe: // // left, right, root

Third task

is to search for an item in a tree