My solution requires:
2 Hash table (ht) that map integer to vector
Approach:
I used level order traversal to track level of a node.
Use ht1 for each level , ht2 for all levels traversed till now.
ht1 maps horizontal distance(hd) to vector of node vals of current level.
After traversing each level sort each vector of ht1 and append to corresponding hd in ht2.
Finally after traversing all levels ht2 will contain all hd mapped to node vals in correct order.