Tree C/C++ Programs

  • Last Updated : 06 May, 2017

C/C++ Program for Tree Traversals
C/C++ Program for Write a C program to Calculate Size of a tree
C/C++ Program for Write C Code to Determine if Two Trees are Identical
C/C++ Program for Write a C Program to Find the Maximum Depth or Height of a Tree
C/C++ Program for Write a C program to Delete a Tree.
C/C++ Program for Write an Efficient C Function to Convert a Binary Tree into its Mirror Tree
C/C++ Program for If you are given two traversal sequences, can you construct the binary tree?
C/C++ Program for Given a binary tree, print out all of its root-to-leaf paths one per line.
C/C++ Program for Lowest Common Ancestor in a Binary Search Tree.
C/C++ Program for The Great Tree-List Recursion Problem.
C/C++ Program for Find the node with minimum value in a Binary Search Tree
C/C++ Program for Level Order Tree Traversal
C/C++ Program for Program to count leaf nodes in a binary tree
C/C++ Program for A program to check if a binary tree is BST or not
C/C++ Program for Level order traversal in spiral form
C/C++ Program for Check for Children Sum Property in a Binary Tree.
C/C++ Program for Convert an arbitrary Binary Tree to a tree that holds Children Sum Property
C/C++ Program for Diameter of a Binary Tree
C/C++ Program for How to determine if a binary tree is height-balanced?
C/C++ Program for Inorder Tree Traversal without Recursion
C/C++ Program for Inorder Tree Traversal without recursion and without stack!
C/C++ Program for Root to leaf path sum equal to a given number
C/C++ Program for Construct Tree from given Inorder and Preorder traversals
C/C++ Program for Given a binary tree, print all root-to-leaf paths
C/C++ Program for Double Tree
C/C++ Program for Maximum width of a binary tree
C/C++ Program for Total number of possible Binary Search Trees with n keys
C/C++ Program for Foldable Binary Trees
C/C++ Program for Print nodes at k distance from root
C/C++ Program for Sorted order printing of a given array that represents a BST
C/C++ Program for Applications of tree data structure
C/C++ Program for Inorder Successor in Binary Search Tree
C/C++ Program for Find k-th smallest element in BST (Order Statistics in BST)
C/C++ Program for Get Level of a node in a Binary Tree
C/C++ Program for Print Ancestors of a given node in Binary Tree
C/C++ Program for Print BST keys in the given range
C/C++ Program for Tournament Tree (Winner Tree) and Binary Heap
C/C++ Program for Check if a given Binary Tree is SumTree
C/C++ Program for Decision Trees – Fake (Counterfeit) Coin Puzzle (12 Coin Puzzle)
C/C++ Program for Check if a binary tree is subtree of another binary tree
C/C++ Program for Trie | (Insert and Search)
C/C++ Program for Trie | (Delete)
C/C++ Program for Connect nodes at same level
C/C++ Program for Connect nodes at same level using constant extra space
C/C++ Program for Sorted Array to Balanced BST
C/C++ Program for Populate Inorder Successor for all nodes
C/C++ Program for Convert a given tree to its Sum Tree
C/C++ Program for Find the largest BST subtree in a given Binary Tree
C/C++ Program for AVL Tree | Set 1 (Insertion)
C/C++ Program for Vertical Sum in a given Binary Tree
C/C++ Program for AVL Tree | Set 2 (Deletion)
C/C++ Program for Merge Two Balanced Binary Search Trees
C/C++ Program for Find the maximum sum leaf to root path in a Binary Tree
C/C++ Program for Merge two BSTs with limited extra space
C/C++ Program for Binary Tree to Binary Search Tree Conversion
C/C++ Program for Construct Special Binary Tree from given Inorder traversal
C/C++ Program for Construct a special tree from given preorder traversal
C/C++ Program for Check if each internal node of a BST has exactly one child
C/C++ Program for Check whether a given Binary Tree is Complete or not
C/C++ Program for Boundary Traversal of binary tree
C/C++ Program for Two nodes of a BST are swapped, correct the BST
C/C++ Program for Construct Full Binary Tree from given preorder and postorder traversals
C/C++ Program for Construct BST from given preorder traversal | Set 1
C/C++ Program for Construct BST from given preorder traversal | Set 2
C/C++ Program for Floor and Ceil from a BST
C/C++ Program for Iterative Preorder Traversal
C/C++ Program for Convert a BST to a Binary Tree such that sum of all greater keys is added to every key
C/C++ Program for Morris traversal for Preorder
C/C++ Program for Linked complete binary tree & its creation
C/C++ Program for Ternary Search Tree
C/C++ Program for Segment Tree | Set 1 (Sum of given range)
C/C++ Program for Segment Tree | Set 2 (Range Minimum Query)
C/C++ Program for Dynamic Programming | Set 26 (Largest Independent Set Problem)
C/C++ Program for Iterative Postorder Traversal | Set 1 (Using Two Stacks)
C/C++ Program for Iterative Postorder Traversal | Set 2 (Using One Stack)
C/C++ Program for Find if there is a triplet in a Balanced BST that adds to zero
C/C++ Program for Find a pair with given sum in a Balanced BST
C/C++ Program for Reverse Level Order Traversal
C/C++ Program for Construct Complete Binary Tree from its Linked List Representation
C/C++ Program for Remove BST keys outside the given range
C/C++ Program for Convert a given Binary Tree to Doubly Linked List | Set 1
C/C++ Program for B-Tree | Set 1 (Introduction)
C/C++ Program for B-Tree | Set 2 (Insert)
C/C++ Program for Longest prefix matching – A Trie based solution in Java
C/C++ Program for Tree Isomorphism Problem
C/C++ Program for Find all possible interpretations of an array of digits
C/C++ Program for Iterative Method to find Height of Binary Tree
C/C++ Program for Custom Tree Problem
C/C++ Program for Check for Identical BSTs without building the trees
C/C++ Program for Convert a given Binary Tree to Doubly Linked List | Set 2
C/C++ Program for Print ancestors of a given binary tree node without recursion
C/C++ Program for Difference between sums of odd level and even level nodes of a Binary Tree
C/C++ Program for Print Postorder traversal from given Inorder and Preorder traversals
C/C++ Program for Find depth of the deepest odd level leaf node
C/C++ Program for Check if all leaves are at same level
C/C++ Program for Print Left View of a Binary Tree
C/C++ Program for B-Tree | Set 3 (Delete)
C/C++ Program for Add all greater values to every node in a given BST
C/C++ Program for Remove all nodes which don’t lie in any path with sum>= k
C/C++ Program for Extract Leaves of a Binary Tree in a Doubly Linked List
C/C++ Program for Deepest left leaf node in a binary tree
C/C++ Program for Find next right node of a given key
C/C++ Program for Splay Tree | Set 1 (Search)
C/C++ Program for Splay Tree | Set 2 (Insert)
C/C++ Program for Sum of all the numbers that are formed from root to leaf paths
C/C++ Program for Red-Black Tree | Set 1 (Introduction)
C/C++ Program for Red-Black Tree | Set 2 (Insert)
C/C++ Program for Convert a given Binary Tree to Doubly Linked List | Set 3
C/C++ Program for Print all nodes that don’t have sibling
C/C++ Program for Lowest Common Ancestor in a Binary Tree | Set 1
C/C++ Program for Find distance between two given keys of a Binary Tree
C/C++ Program for Print all nodes that are at distance k from a leaf node
C/C++ Program for Check if a given Binary Tree is height balanced like a Red-Black Tree
C/C++ Program for Interval Tree
C/C++ Program for Print a Binary Tree in Vertical Order | Set 1
C/C++ Program for Print all nodes at distance k from a given node


My Personal Notes arrow_drop_up