Recommend this page to a friend! |
Classes of gustavo oliveira de avila | > | JavaScript Binary Search Tree | > | index.html | > | Download |
|
|
![]() |
<html> <head> <script src="SBT.js"></script> </head> <body> <script> var text=new binary_tree(["bar","axe","cocoa","avocado","executable","file"]); text.insert("header"); console.log("axe index="+text.search("axe")); console.log("text tree array="+JSON.stringify(text.tree)); var number=new binary_tree([2,1,5,6,3,4]); number.insert(2001); console.log("5 index="+number.search(5)); console.log("number tree array="+JSON.stringify(number.tree)); </script> </body> </html> |