Java Program to Delete a Particular Node in a Tree Without Recursion

This is a Java Program to to delete a particular node from the tree without using recursion. Here is the source code of the Java Program to Delete a Particular Node in a Tree Without Using Recursion. The Java program is successfully compiled and run on a Windows system. The program output is also shown … Read more

advertisement

Java Program to Check if a Given Binary Tree is an AVL Tree or Not

This is a Java Program to implement a binary tree and check whether it is AVL Tree or not. An AVL tree is a self-balancing binary search tree. It was the first such data structure to be invented. In an AVL tree, the heights of the two child subtrees of any node differ by at … Read more

advertisement

Java Program to Perform Right and Left Rotation on a Binary Search Tree

This is a Java Program to implement Self Balancing Binary Search Tree. 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. These structures provide efficient implementations for mutable ordered … Read more

advertisement

Java Program to Implement Ternary Tree

This Java program is to Implement ternary tree. In computer science, a ternary tree is a tree data structure in which each node has at most three child nodes, usually distinguished as “left”, “mid” and “right”. Nodes with children are parent nodes, and child nodes may contain references to their parents. Outside the tree, there … Read more

advertisement

Java Program to Check if a Binary Tree is Subtree of Another Binary Tree

This Java program is to Implement binary tree and check whether a tree is subtree of another. This can be done in two ways. A tree can be subtree of another if they have same structure (same object references but different value) and with same structure and values. This given class checks for both. Here … Read more

advertisement

Java Program to Implement Range Tree

This is a java program to implement Range Tree. A range tree on a set of 1-dimensional points is a balanced binary search tree on those points. The points stored in the tree are stored in the leaves of the tree; each internal node stores the largest value contained in its left subtree. A range … Read more

advertisement

Java Program to Implement Interval Tree

This is a java 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

Java Program to Create Expression Tree from Infix, Postfix and Prefix Expressions

This is a java program to construct an expression tree using infix expression and perform the infix, prefix and postfix traversal of the expression tree. The leaves of a binary expression tree are operands, such as constants or variable names, and the other nodes contain operators. These particular trees happen to be binary, because all … Read more

advertisement

Java Program to Implement Double Order Traversal of a Binary Tree

This is a Java Program to perform Double Order traversal over binary 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 the source code of the Java Program to Implement Double Order Traversal of a Binary Tree. The Java program is … Read more

advertisement

Java Program to Perform Insertion in Binary Search Tree

This is a Java Program to perform insertion in the binary search tree. Here is the source code of the Java Program to Perform Insertion in a BST. The Java program is successfully compiled and run on a Windows system. The program output is also shown below. //This is a java program to insert elements … 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.