Update js-data-structures-binary-search-tree.md

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-08-19 11:02:30 +03:00
committed by GitHub
parent c2454f0d43
commit 579f363845

View File

@ -12,7 +12,7 @@ firstSeen: 2021-08-31T05:00:00-04:00
### Definition
A binary search tree is a data structure consisting of a set of orderd linked nodes that represent a hierarchical tree structure. Each node is linked to others via parent-children relationship. Any given node can have at most two children (left and right). The first node in the binary search tree is the root, whereas nodes without any children are the leaves. The binary search tree is organized in such a way that for any given node, all nodes in its left subtree have a key less than itself and all nodes in its right subtree have a key greater than itself.
A binary search tree is a data structure consisting of a set of ordered linked nodes that represent a hierarchical tree structure. Each node is linked to others via parent-children relationship. Any given node can have at most two children (left and right). The first node in the binary search tree is the root, whereas nodes without any children are the leaves. The binary search tree is organized in such a way that for any given node, all nodes in its left subtree have a key less than itself and all nodes in its right subtree have a key greater than itself.
![JavaScript Binary Search Tree visualization](./blog_images/ds-binary-search-tree.png)