A pointer variable contains a memory address of some other entity.The most common programming language using pointers is C++.
A binary tree is made of nodes.It contains 2 pointers that is a left pointer and a right pointer.The root pointer points to the topmost node in the tree.A null pointer represents the binary tree with no elements.It is an empty tree.The binary tree which is empty is made of a single node.The normal binary tree consists of the left and right pointers.It is an important class of tree used in data structure. It is created by using pointers in the C programming language.
NEED FOR BINARY SEARCH TREE
- Binary tree is needed to use because it extends the capability of a normal array.
- It is helpful in changing the data set in sorted order.
- It relies on its implicit structure(left or right node) to keep a record of where each element is.
- Because of the binary structure insertion and deletion of nodes can be achieved very quickly.
BENEFITS OF BINARY SEARCH TREE
- It is an ideal way to go with the hierarchical way of storing data.
- They are used to store as many nodes as possible.
- It is a flexible way of holding and moving data.
- It reflects structural relationships that exist in the given data set.
Through this blog we have discussed what a binary tree is and what are the structures.Binary search tree is a part of the C++ programming language.The important function of pointers in binary trees is to collect and store data.
All the concepts of this topic <Basics to Pointers and Binary Search Tree for C> have been compiled into a Certification Assessment Course. This Assessment will help you to check and enhance your knowledge about the subject and offer you to get certified from The Growth Central VC. This Assessment has been made considering the latest scenario of the industry.