A Binary Search Tree (abbreviated as BST) is a tree structure comprised of nodes that maintain a specific order among their keys. Given a single node and two BSTs and , in which for all nodes and , the objective is to design a function that integrates the given input into a unified BST with the nodes . Be aware that AVL and Red-Black trees are specific types of BSTs. Given the constraint that , , and must share the same type, they are required to be either all BSTs, all AVL trees, or all Red-Black trees.
The function is implemented with the steps: (1) selecting a subtree from either or , where a subtree is defined as potentially being empty, a portion, or the entire tree, (2) detaching , (3) attaching the other tree (which does not contain ) under , (4) re-attaching the tree rooted at to the former parent of . The modified tree is then returned as . If has no former parent, the tree rooted at is simply returned as . The following figure demonstrates an example result of , where the letters and denote arbitrary subtrees.
Please note that almost all steps, except for (1), have been finalized — there could be multiple ways to choose in (1). The tree returned from may not be unique. Additionally, unlike AVL or Red-Black trees, does not perform re-coloring and re-balancing. Consider the following arguments passed into . All nil nodes (considered as leaves in red-black trees) are omitted for brevity.
Please select the correct description(s) below.

