This question evaluates understanding of binary tree traversal, depth tracking, and view computation for left and right perspectives, plus the ability to implement a concurrent single-pass traversal while handling edge cases such as empty trees and duplicate keys.

Given the root of a binary search tree, output two lists: the nodes visible from the left side and the nodes visible from the right side, from top to bottom. Implement a single-pass traversal that computes both views concurrently. Discuss iterative vs. recursive strategies, how you track depth and first/last-at-depth nodes, and analyze time/space complexity. Handle empty trees and trees with duplicate keys.