Tree bottom view binary tree

giving first test case as the run time error