javascript binary search tree
1.0.0
การปรับปรุงโครงสร้าง JavaScript BST ที่เรียบง่ายและบริสุทธิ์ซึ่งใช้การอัพเดทกลับมาเพื่อเพิ่มหรือลบรายการ
var tree = new BST ( ) ; // Initialize
tree . add ( value ) ; // Add a new node
tree . remove ( value ) ; // Remove an existing node
tree . print ( ) ; // Print the tree as a text-pyramid in console
tree . min ( ) ; // Find smallest node
tree . max ( ) ; // Find largest node
tree . find ( value ) ; // Find node with given value
tree . destroy ( ) ; // Clears the root หมายเหตุ: เพื่อรักษาระยะห่างในขณะที่ใช้ tree.print() ค่าใด ๆ ที่มากกว่า 2 หลัก/อักขระจะถูกแปลงเป็นตำนานที่มีชื่อว่า 'a' ถึง 'z' ฉลากและคีย์จะถูกพิมพ์แยกกัน
ได้รับใบอนุญาตภายใต้ใบอนุญาตสาธารณะ GNU ทั่วไป v3.0 มีอิสระที่จะคัดลอกใช้และแจกจ่าย