## C++ Program to Find the Number of Nodes in a Binary Tree

This is a C++ Program for counting number of nodes present in a tree using recursion. Problem Description Here in this problem we will be finding the total number of nodes present in a given tree using C++ Language. Expected Input and Output Case 1. Balanced Tree:When the weight is equal on both the sides … Read more

## C++ Program to Count all the Leaf Nodes in a given Binary Search Tree

This is a C++ Program for counting the total number of leaf nodes present in a given Binary Search Tree. Problem Description We will be given a Binary Search Tree and we have to create a C++ program which counts the total number of leaf nodes present in it using recursion. A leaf node is … Read more

## C++ Program to Count all the Internal Nodes in a given Binary Search Tree

This is a C++ Program for counting the total number of internal nodes present in a given Binary Search Tree. Problem Description We will be given a Binary Search Tree and we have to create a C++ program which counts the total number of non-leaf nodes i.e. Internal Nodes present in it using recursion. An … Read more

## C++ Program to Implement Binary Search Algorithm using Iteration

This is a C++ Program to implement Binary Search Algorithm. Problem Description We have to write a C++ Program which either finds the position of an element in an array or detects the presence of an element in an array using Binary Search Algorithm. Expected Input and Output Case 1. Average Case: When the element … Read more

## C++ Program to Implement Linear Search Algorithm using Recursion

This is a C++ Program to implement Linear Search Algorithm using recursion. Problem Description We have to create a C++ Program which finds the position of an element in an array using Linear Search Algorithm using recursion. Expected Input and Output 1. Average Case: When the element searched for is any random element in the … Read more

## C++ Program to Implement Linear Search Algorithm

This is a C++ Program to implement Linear Search Algorithm. Problem Description We have to write a C++ Program which finds the position of an element in an array using Linear Search Algorithm. Create a separate function for linear search and then call it using an object. Expected Input and Output Case 1. Best Case: … Read more

## C++ Program for Level Order Traversal of a given Tree using Recursion

This is a C++ Program for Level Order Traversal of a Tree using Recursion. Problem Description Here in this problem we will be traversing the nodes of tree from left to right level by level. First the nodes at level 1 will be printed followed by the level two and so on. This problem is … Read more

## C++ Program to create a Mirror Image of a given Binary Tree

This is a C++ Program for creating a mirror image of a binary tree using recursion. Problem Description We will be given a Tree and we have to create its mirror image and perform level order traversal on the tree before and after creating its mirror image. By doing a level order traversal, we will … Read more

## C++ Program for Spiral Traversal of a Tree using recursion

This is a C++ Program for Spiral Traversal of a Tree using Recursion. Problem Description In this program we are going to create a tree, and will do its spiral traversal. Spiral Traversal basically means first traversing the nodes in a tree left to right then right to left. If for a particular level we … Read more 