s

Tree

Total Programs :- 10

Representation of Binary tree using array

•Create a node, with left and right part
•Take input in array
•Perform Inorder
•Print the Tree

Checkout here...

Binary Tree Traversal

•Create a node, with left and right
•Traverse Preorder
•Traverse Inorder
•Traverse Postorder
•Print all traversals

Checkout here...

Finding the number of nodes in a binary tree

•Create a Binary Tree
•Count full nodes with help of root
•Print it

Checkout here...

Finding the height of a binary tree

•Create a Binary Tree
•Stay connected with root
•Move with node count
•Print height of Tree

Checkout here...

Finding the number of leaves in a binary tree

•Create a node
•Count with help of left and right
•Print it

Checkout here...

Deleting a binary tree

•Create a node
•Delete left and right of node
•Must clear the node reference
•Tree is deleted

Checkout here...

Full Binary Tree

•Create a node
•Check if every node has 0 or 2 children
•Print Tree is Full or not

Checkout here...

Complete Binary Tree

•Create a node
•Check all levels are completely filled and last level has all keys as left as possible
•Print 'is Tree Complete?'

Checkout here...

Perfect Binary Tree

•Create a node
•Check all the internal nodes have two children and all leaf nodes are at the same level
•Print Tree is Perfect or not

Checkout here...

Binary Search Tree

•Remember the properties
•Create a node
•Insert the key
•Delete key
•Traverse Inorder and print it

Checkout here...

Time to Connect

copyright ©2021

Arpit Somani