Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Linked List Tree Amazon

Convert a given Binary Tree to Doubly Linked List Set 4

Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as previous and next pointers respecti...
Matrix Tree Matrix

Construct tree from ancestor matrix

Given an ancestor matrix mat[n][n] where Ancestor matrix is defined as below. mat[i][j] = 1 if i is ancestor of j mat[i][j] = 0, otherwise Construct a Binary ...
Matrix Tree Matrix

Construct Ancestor Matrix from a Given Binary Tree

Given a Binary Tree where all values are from 0 to n-1. Construct an ancestor matrix mat[n][n]. Ancestor matrix is defined as below. mat[i][j] = 1 if i is ancestor ...
Queue Tree Amazon

Construct Complete Binary Tree from its Linked List Representation

Given Linked List Representation of Complete Binary Tree, construct the Binary tree. A complete binary tree can be represented in an array in the following approach. ...
Queue Tree Amazon

Level Order Tree Traversal

Level order traversal of a tree is breadth first traversal for the tree. Level order traversal of the above tree is 1 2 3 4 5 Recommended: Please solve it on &#x2...
Queue Tree cpp-queue

Number of siblings of a given Node in n-ary Tree

Given an N-ary tree, find the number of siblings of given node x. Assume that x exists in the given n-ary tree. Example : Input : 30 Output : 3 Recommended : Ple...
Queue Stack Tree

ZigZag Tree Traversal

Write a function to print ZigZag order traversal of a binary tree. For the below binary tree the zigzag order traversal will be 1 3 2 7 6 5 4 Recommended: Please ...
Queue Tree Queue

Check whether a given Binary Tree is Complete or not Set 1 (Iterative Solution)

Given a Binary Tree, write a function to check whether the given Binary Tree is Complete Binary Tree or not. A complete binary tree is a binary tree in which every le...
Queue Tree Amazon

Find maximum level sum in Binary Tree

Given a Binary Tree having positive and negative nodes, the task is to find maximum sum level in it. Examples: Input : 4 / ...
Queue Tree Queue

Iterative Method to find Height of Binary Tree

There are two conventions to define height of Binary Tree 1) Number of nodes on longest path from root to the deepest node. 2) Number of edges on longest path from ro...

Subscribe to Our Newsletter