• + 0 comments

    This problem is simply not well defined. "the set of nodes visible when the tree is viewed from the top" is meaningless. There is no "top" though I suppose they mean "root". Similarly "viewed" simply does not mean anything in this context.