diff --git a/blog_posts/js-data-structures-binary-search-tree.md b/blog_posts/js-data-structures-binary-search-tree.md index 932bb9ad3..addcc32c5 100644 --- a/blog_posts/js-data-structures-binary-search-tree.md +++ b/blog_posts/js-data-structures-binary-search-tree.md @@ -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)