Computer Science, asked by gbhapkar186, 3 months ago

Write a Program for
Crete a binary tree with the following condition and perform the search on it for the given data.

1.Data – Tree starts with the Given Number and grows by dividing it by 2.

2. Left Node – Less number

3Right Node – Greater number

Answers

Answered by Harshitpro123
0

Explanation:

Our solar system consists of our star, the Sun, and everything bound to it by gravity — the planets Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus and Neptune, dwarf planets such as Pluto, dozens of moons and millions of asteroids, comets and meteoroids.

Answered by ᎷᎪᎠᎪᎡᎪ
1

A program to check if a binary tree is BST or not

A binary search tree (BST) is a node based binary tree data structure which has the following properties. 

• The left subtree of a node contains only nodes with keys less than the node’s key. 

• The right subtree of a node contains only nodes with keys greater than the node’s key. 

• Both the left and right subtrees must also be binary search trees.

From the above properties it naturally follows that: 

• Each node (item in the tree) has a distinct key.

Similar questions