Given the root of a binary search tree (BST):
-
Implement vertical order traversal: assign the root column 0, left child column −1, right child column +1; return columns from leftmost to rightmost. Within each column, list node values from top to bottom, breaking ties by left-to-right order at the same depth. Provide the algorithm, data structures used, and complexity analysis.
-
Convert the BST into a sorted doubly linked list in-place (non-circular) by reusing nodes (left becomes prev, right becomes next). Return the head of the list. Discuss recursive vs iterative approaches, edge cases (empty tree, single node, skewed tree), and time/space complexity.