-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (35 loc) · 1.15 KB
/
index.html
File metadata and controls
38 lines (35 loc) · 1.15 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BST Visualizer</title>
<link rel="stylesheet" type="text/css" href="BSTV.css">
</head>
<body>
<h1>Binary Search Tree Visualizer</h1>
<div id="controls">
<div class="divs">
<input type="number" id="value" placeholder="Enter value">
<button onclick="insertNode()">Insert</button>
<button onclick="deleteNode()">Delete</button>
<button onclick="searchNode()">Search</button>
</div>
<div class="divs">
<select id="traversal">
<option value="levelorder">Level-Order</option>
<option value="inorder">In-Order</option>
<option value="preorder">Pre-Order</option>
<option value="postorder">Post-Order</option>
</select>
<button onclick="traverseTree()">Traverse</button>
</div>
<div class="divs">
<button onclick="resetTree()">Reset</button>
</div>
</div>
<div id="message"></div>
<svg id="tree"></svg>
<script src="BSTV.js"></script>
</body>
</html>