×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

Problems on Binary Tree

Binary Tree is one of the most common data structures that are used in solutions of various Interview and Competitive Programming problems. Practice problems on Binary Tree.

Time Complexity

Time and Space complexity of Binary Search Tree (BST)

In this article, we are going to explore and calculate about the time and space complexity of binary search tree operations.

Shwet Shukla Shwet Shukla
Algorithms

Average Height of Random Binary Search Tree

In this post, we discuss the average height of a Random Binary Search Tree (BST) (that is 4.31107 ln(N) - 1.9531 lnln(N) + O(1)) by discussing various lemmas and their proofs. We omit full proofs and discuss the essential key points for easier understanding.

Erick Lumunge
Algorithms

Average height of Random Binary Tree

In this article, we have explored an insightful approach/ algorithm to find the average height of Random Binary Tree which is of the order O(N^0.5). This will strengthen our understanding of binary trees and their applications.

Rohan Chandrashekar Rohan Chandrashekar
Algorithms

Average height of nodes in a Binary Tree

In this article, we have explored an insightful approach/ algorithm to find the average height of nodes in the given Binary Tree. This will strengthen our understanding of binary trees and their applications.

Rohan Chandrashekar Rohan Chandrashekar
Time Complexity

Time & Space Complexity of Binary Tree operations

In this article, we will be discussing Time and Space Complexity of most commonly used binary tree operations like insert, search and delete for worst, best and average case.

Mohd Ehtesham Uddin Qureshi Mohd Ehtesham Uddin Qureshi
Algorithms

Recovering a Binary Search Tree that has two nodes swapped

In this article, we will be developing and implementing an algorithm that recovers a Binary Search Tree (BST) that had two of its nodes swapped accidentally.

Thompson Mina
Data Structures

Scapegoat tree

In this article, we will explore in detail about Scapegoat tree which is a Self Balancing Binary Tree without requiring any extra space which puts Scapegoat Tree at an unique advantage.

Sanjana Babu
Algorithms

List of 50+ Binary Tree Problems for Coding Interviews

We have listed important Problems on Binary Tree which you must practice for Coding Interviews and listed introductory and background topics on Binary Tree as well. You must bookmark this page and practice all problems listed.

Aditya Chatterjee Aditya Chatterjee
Algorithms

Two Sum Problem in Binary Search Tree

We have solved the Two Sum Problem in Binary Search Tree using three different approaches involving Depth First Search, Inorder Traversal and Augmented Binary Search Tree.

Anirudha Shivarkar
Algorithms

Invert / Reverse a Binary Tree [3 methods]

Inverting a binary tree is one of the most common questions asked in the interviews of many companies. In this article, we will see in detail as to how one can understand and tackle this task of inverting a binary tree using recursion, stack and queue.

Sanjana Babu
Problems on Binary Tree

Implement Binary Tree in Python

We have explored the strategy to implement Binary Tree in Python Programming Language with complete explanation and different operations like traversal, search and delete.

Ansh Agrawal Ansh Agrawal
Algorithms

Types of views in Binary tree

We have explored the different types of views of the binary tree (like Left, Right, Top and Bottom View) and discussed how to find them.

Shreya Shah Shreya Shah
Algorithms

Convert a binary tree into its mirror tree

Given a binary tree, we have to write an algorithm to convert the binary tree to its mirror tree. A mirror tree is another binary tree with left and right children of all non-leaf nodes interchanged.

Akshay Atam
Problems on Binary Tree

Construct Binary Tree from Inorder and Preorder traversal

We present two approaches to Construct Binary Tree from Inorder and Preorder traversal. We start with background information on constructing Binary Tree from a given traversal or a set of traversals.

Srishti Guleria Srishti Guleria
Data Structures

Applications of Binary Tree

Binary Tree is the most used Tree Data Structure and is used in real life Software systems. We have listed applications of Binary Tree and its variants.

Ue Kiao, PhD Ue Kiao, PhD
Problems on Binary Tree

Level order traversal of a Binary Tree

In this article, we have explored Level order traversal of a Binary Tree in depth using two approaches: recursive approach and queue.

Akshay Atam
Algorithms

Zig Zag Traversal of Binary Tree

In this article, we present 4 different approaches for Zig Zag Traversal of Binary Tree using stack, deque, recursion and an iterative approach.

Srishti Guleria Srishti Guleria
Algorithms

Check if 2 Binary Trees are isomorphic

Two Binary Trees are known as isomorphic if one of them can be obtained from the other one by series of flipping of nodes, swapping the children both left and right of number of nodes.

Srishti Guleria Srishti Guleria
Algorithms

Convert Binary Tree to Circular Doubly Linked list

To convert binary tree to circular doubly linked list, we will take left node as previous pointer and right node as next pointer. The order of nodes in Doubly Linked List must be same as in inorder of the given binary tree.

Srishti Guleria Srishti Guleria
Algorithms

Succinct (0-1) Encoding of Binary Tree

Succinct (0-1) Encoding of Binary Tree is an approach to encode a Binary Tree to the lowest possible space and maintain the structural information.

Srishti Guleria Srishti Guleria
Algorithms

LCA in Binary Tree using Euler tour and Range Minimum Query

In this problem, we will find the Lowest Common Ancestor of a Binary Tree using Euler tour and Range Minimum Query. We can solve the LCA problem by reducing it to a RMQ problem.

Srishti Guleria Srishti Guleria
Algorithms

Lowest Common Ancestor in a Binary Tree

In binary trees, for given two nodes a and b, the lowest common ancestor is the node of which both a and b are descendants. We explored the algorithm to find Lowest Common Ancestor in a Binary Tree.

Srishti Guleria Srishti Guleria
Problems on Binary Tree

Operations in Threaded Binary Tree

There are three main operations which can be done on a threaded binary tree Insert, Search and Delete operation which we have explained in depth.

Hrithik Shrivastava Hrithik Shrivastava
Problems on Binary Tree

Threaded Binary Tree

Threaded binary tree is a simple binary tree but they have a speciality that null pointers of leaf node of the binary tree is set to inorder predecessor or inorder successor.

Hrithik Shrivastava Hrithik Shrivastava
Problems on Binary Tree

Checking if a Binary Tree is foldable

A binary tree is foldable if the left subtree and right subtree are mirror images of each other. An empty tree is also foldable. We have presented two algorithms to check if Binary Tree is foldable.

Srishti Guleria Srishti Guleria
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship