IDNLearn.com is designed to help you find the answers you need quickly and easily. Our community provides timely and precise responses to help you understand and solve any issue you face.
Answer:
Pre-order: Kirk, Chekov, Khaaaan, Spock, Scotty, McCoy, Sulu, Uhuru
In-order: Chekov, Khaaaan, Kirk, McCoy, Scotty, Spock, Sulu, Uhuru
Post-order: Khaaaan, Chekov, McCoy, Scotty, Sulu, Uhuru, Spock, Kirk
Explanation:
The binary search tree is described in the diagram below.
The pre-order traversal of the binary tree gets the root, then the left node and right node. The in-order traversal picks the left node, the root node, and then the right node while the post-order traversal of the binary tree follows the left node, right node, and then the root node.