Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
40 lines (29 loc) · 790 Bytes

File metadata and controls

40 lines (29 loc) · 790 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package org.study;
public class TreeTest {
public static void main(String[] args) {
TreeBinarySearch bst = new TreeBinarySearch();
bst.insertBST(1);
bst.insertBST(9);
bst.insertBST(4);
bst.insertBST(5);
bst.insertBST(6);
bst.insertBST(7);
bst.insertBST(2);
bst.insertBST(3);
bst.insertBST(10);
System.out.println("Binary Tree >>>");
bst.printBST();
System.out.println("Is There '90'?>>>");
TreeNode p1 = bst.searchBST(90);
if(p1 != null)
System.out.println(p1.data+" exist");
else
System.out.println("no");
System.out.println("Is There '10'?>>>");
TreeNode p2 = bst.searchBST(10);
if(p2 != null)
System.out.println(p2.data+" exist");
else
System.out.println("no");
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.