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'to 'z'로 표시된 범례로 변환됩니다. 레이블과 키는 별개로 인쇄됩니다.
GNU 일반 공개 라이센스 v3.0에 따라 라이센스. 복사, 사용 및 배포 할 수 있습니다.