Level order traversal for binary tree going up towards the root