Assignment 1

1. Write a procedure for encoding an arbitrary rooted ordered tree as a
binary tree in the Left-Child Right-Sibling scheme.
Also write a routine to decode it and recover the original tree.
2. Write routines to implement in-order, pre-order and post-order tree
traversals. Also implement level-order traversals, and zig-zag traversals.
3. Write a routine for recovering the parent, left-child and right child of
a node in a binary heap.
Powered by