Binary tree on Ancient Brain
Here is a program in JavaScript to implement and search a binary tree.
Using the "Ancient Brain" platform.
Click to run World:
Binary tree at
Ancient Brain.
- Credits:
- This is a modified port of "01_binary_tree_viz"
from AI course
by Daniel Shiffman.
- See his binary tree videos parts one
and two.
- He does not use Ancient Brain but codes his JS on localhost.
- Why I use Ancient Brain:
You don't need your own setup.
You don't need localhost.
You can clone and edit it directly on Ancient Brain.
- Reload for a new search problem.
- You must "view console" to see what is happening:
-
This World writes lots of information to the browser console.
- You must
view console to see what is going on during
(a) build tree and (b) search tree.
View the JS source code