Solution Found!
Write a method to generate an N-node random binary search tree with distinct keys1
Chapter 4, Problem 4.34(choose chapter or problem)
QUESTION:
Write a method to generate an N-node random binary search tree with distinct keys1 through N. What is the running time of your routine?
Questions & Answers
QUESTION:
Write a method to generate an N-node random binary search tree with distinct keys1 through N. What is the running time of your routine?
ANSWER:Step 1 of 2
A Binary Search Tree or BST is a type of binary tree. Each node in BST has at most 2 children. The node values in the left subtree are less than the root value in BST. And the right subtree nodes have a value greater than the root value of BST.