[AlgoExpert] Largest BST SizeRead more
[AlgoExpert] Max Subsequence Dot ProductRead more
[AlgoExpert] Degress Of SeparationRead more
[Geeks for Geeks] Reverse alternate levels of a perfect binary tree

Reverse alternate levels of a perfect binary tree

Given a complete binary tree, reverse the nodes present at alternate levels.

Read more
[Geeks for Geeks] Check if subtree

Check if subtree

Given two binary trees with head reference as T and S having at most N nodes. The task is to check if S is present as subtree in T.

A subtree of a tree T1 is a tree T2 consisting of a node in T1 and all of its descendants in T1.

Read more
[Geeks for Geeks] Lowest Common Ancestor in a BST

Lowest Common Ancestor in a BST

Given a Binary Search Tree (with all values unique) and two node values. Find the Lowest Common Ancestors of the two nodes in the BST.

Read more
[Geeks for Geeks] Top View of Binary Tree

Top View of Binary Tree

Given below is a binary tree. The task is to print the top view of binary tree. Top view of a binary tree is the set of nodes visible when the tree is viewed from the top. For the given below tree

Read more
[Geeks for Geeks] Bottom View of Binary Tree

Bottom View of Binary Tree

Given a binary tree, print the bottom view from left to right.
A node is included in bottom view if it can be seen when we look at the tree from bottom.

Read more
[Geeks for Geeks] Full binary tree

Full binary tree

Given a Binary Tree. Check whether the Binary tree is a full binary tree or not.

Read more
[Geeks for Geeks] Preorder Traversal and BST

Preorder Traversal and BST

Given an array arr[ ] of size N consisting of distinct integers, write a program that returns 1 if given array can represent preorder traversal of a possible BST, else returns 0.

Read more