File: index.html

Recommend this page to a friend!
  Classes of gustavo oliveira de avila   JavaScript Binary Search Tree   index.html   Download  
File: index.html
Role: Example script
Content type: text/plain
Description: example of usage
Class: JavaScript Binary Search Tree
Search values in an array using binary search
Author: By
Last change:
Date: 7 years ago
Size: 500 bytes
 

Contents

Class file image 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>