Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package prep_33_binarysearchtrees;
- public class InsertApp {
- public static void main(String[] args) {
- BST_insertion tree = new BST_insertion();
- /* Let us create following BST
- 50
- / \
- 30 70
- / \ / \
- 20 40 60 80 */
- tree.insert(50);
- tree.insert(30);
- tree.insert(20);
- tree.insert(40);
- tree.insert(70);
- tree.insert(60);
- tree.insert(80);
- // print inorder traversal of the BST
- tree.inorder();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement