## Postorder Traversal of a Binary Tree using Recursion in C++

This is a C++ Program to perform PostOrder Traversal of a given Binary Tree recursively. Problem Description We will be given a Binary Tree and we have to create a recursive C++ program to print all the nodes in a tree using PostOrder traversal. We have to create a separate recursive function which will traverse … Read more

## Preorder Traversal of a Binary Tree using Recursion in C++

This is a C++ Program for performing recursive PreOrder Traversal of a given Binary Tree. Problem Description We will be given a Binary Tree and we have to create a recursive C++ program for PreOrder Traversal of that Tree. Expected Input and Output Case 1. Balanced Tree:When we have equal weight on both the sides … Read more

## Inorder Traversal of a Binary Tree using Recursion in C++

This C++ program, using recursion, performs recursive Inorder traversal of a Given Binary Tree. Here is the source code of the C++ program to perform Inorder Traversal. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C++ Program to Perform Inorder Recursive Traversal of … Read more

## C++ Program to Create the Prufer Code for a Tree

This is a C++ program to create the prufer code for a tree. Problem Description 1. This algorithm generates a prufer code for the given tree. 2. For a given tree of v vertexes, a prufer code is a unique sequence of v-2 vertex indexes. 3. The time complexity to generate this code is O(v*e). … Read more

## C++ Program to Perform AVL Tree Operations

This is a C++ Program to print the kind of rotation that is performed when an element is inserted or deleted from tree. In discrete mathematics, tree rotation is an operation on a binary tree that changes the structure without interfering with the order of the elements. A tree rotation moves one node up in … Read more

## C++ Program to Perform Dictionary Operations in a Binary Search Tree

This is a C++ Program to perform dictionary operations in binary search tree. In computer science, a binary search tree (BST), sometimes also called an ordered or sorted binary tree, is a node-based binary tree data structure where each node has a comparable key (and an associated value) and satisfies the restriction that the key … Read more

## C++ Program to Create a Balanced Binary Tree of the Incoming Data

This is a C++ Program to create a balanced binary tree. In computer science, a self-balancing (or height-balanced) binary search tree is any node-based binary search tree that automatically keeps its height (maximal number of levels below the root) small in the face of arbitrary item insertions and deletions. Here is source code of the … Read more

## Postorder Traversal of a Binary Tree without using Recursion in C++

This is a C++ Program to print postorder traversal of the given binary tree without using recursion. Here is source code of the C++ Program to Perform Postorder Non-Recursive Traversal of a Given Binary Tree. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. #include<iostream>#include<conio.h>#include<stdlib.h> using … Read more

## Preorder Traversal of a Binary Tree without using Recursion in C++

This is a C++ Program to print preorder traversal of a given binray tree without using recursion. Here is source code of the C++ Program to Perform Preorder Non-Recursive Traversal of a Given Binary Tree. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. #include … Read more 