C++ Program to Create Mirror Image of a 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

advertisement

Spiral Order Traversal of a Tree using Recursion in C++

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

advertisement

C++ Program to Implement Double Order Traversal of a Binary Tree

This is a C++ Program to print the double order traversal of the given tree. Recurse through: 1. Visit root of (sub)tree. 2. Visit left sub-tree. 3. Revisit root of (sub)tree. 4. Visit right sub-tree. Here is source code of the C++ Program to Implement Double Order Traversal of a Binary Tree. The C++ program … Read more

advertisement

Level Order Traversal of a Tree using Recursion in C++

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

advertisement

C++ Program to Implement Interval Tree

This is a C++ Program to implement interval tree. In computer science, an interval tree is an ordered tree data structure to hold intervals. Specifically, it allows one to efficiently find all intervals that overlap with any given interval or point. It is often used for windowing queries, for instance, to find all roads on … Read more

advertisement

C++ Program to Search for an Element in a Binary Search Tree

C++ Program to Search for an Element in a Binary Search Tree. Problem Description 1. Implement binary search to find the existence of a search sequence in a binary search tree. 2. The worst case time complexity of Binary search is O(n) but for the average case, it is O(log(n)). Problem Solution 1. Construct binary … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.