| 1. |
What is binary search tree data structure? What are the applications for binary search trees? |
|
Answer» A binary search tree is a data structure that stores items in sorted order. In a binary search tree, each node stores a key and a value. The key is used to access the item and the value is used to determine whether the item is present or not. The key can be any type of value such as an integer, floating point number, character string, or even a combination of these types. The value can be any type of items such as an integer, floating point number, character string, or even a combination of these types. When a node is added to the tree, its key is used to access the item stored at that node. When a node is removed from the tree, its key is used to access the item stored at that node. A binary search tree is a special type of binary tree that has a specific order of elements in it. It has three basic qualities:
Following are some applications for binary tree data structure:
|
|