How would you implement vertical order traversal of a binary tree?
Implement vertical_order_traversal(root). The input is a nested dictionary tree node with keys val, left, and right; child nodes are dictionaries or null. Return a list of columns ordered from leftmost to rightmost. Within each column, preserve top-to-bottom order, and for nodes at the same position, preserve left-to-right order.
root, a nested dictionary or nulldef vertical_order_traversal(root):