Bottom View of binary tree

Pls do correction in code.
Segmentation fault is occuring