Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Tree Amazon Cadence India

Write a Program to Find the Maximum Depth or Height of a Tree

Given a binary tree, find height of it. Height of empty tree is 0 and height of below tree is 3. Example Tree Recommended: Please solve it on “PRACTICE&#x20...
Binary Search Tree Tree Accolite

A program to check if a binary tree is BST or not

A binary search tree (BST) is a node based binary tree data structure which has the following properties. • The left subtree of a node contains only nodes with...
Tree Tree

Double Tree

Write a program that converts a given tree to its Double tree. To create Double tree of the given tree, create a new duplicate for each node, and insert the duplicate...
Tree cpp-unordered_map Inorder Traversal

Construct Tree from given Inorder and Preorder traversals

Let us consider the below traversals: Inorder sequence: D B E A F C Preorder sequence: A B D E C F Recommended: Please solve it on “PRACTICE” first, be...
Tree Tree

Get Level of a node in a Binary Tree

Given a Binary Tree and a key, write a function that returns level of the key. For example, consider the following tree. If the input key is 3, then your function ...
Tree Adobe Amazon

Check if a given Binary Tree is SumTree

Write a function that returns true if the given Binary Tree is SumTree else false. A SumTree is a Binary Tree where the value of a node is equal to sum of the nodes p...
Binary Search Tree Tree Amazon

Binary Tree to Binary Search Tree Conversion

Given a Binary Tree, convert it to a Binary Search Tree. The conversion must be done in such a way that keeps the original structure of Binary Tree. Examples. Examp...
Binary Search Tree doubly linked list Self-Balancing-BST

Merge Two Balanced Binary Search Trees

You are given two balanced binary search trees e.g., AVL or Red Black Tree. Write a function that merges the two given balanced BSTs into a balanced binary search tre...
Advanced Data Structure Binary Search Tree Tree

AVL Tree Set 1 (Insertion)

AVL tree is a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees cannot be more than one for all nodes. An Examp...
Advanced Data Structure Tree Amazon

AVL Tree Set 2 (Deletion)

We have discussed AVL insertion in the previous post. In this post, we will follow a similar approach for deletion. Steps to follow for deletion. To make sure that t...

Subscribe to Our Newsletter