Questions on Binary Trees, Binary Search Trees and more.
Height Balanced Binary Tree
Given a pointer to the root node of a binary tree, return true if the binary tree is height-balanced. A height-balanced binary tree is a Binary tree i...
Given a Binary Search Tree, Traverse the tree in Preorder, Postorder, and inorder traversal.
Branch Sums in a Binary Tree
Given a Binary Tree, compute the sum of all the branches in the tree. 1 branch is the path from the root to a leaf.
Invert Binary Tree
Given a binary tree, invert the binary tree - Inverting a binary tree means that the resulting binary tree should be a mirror replica of the input bin...
Kth Largest in a BST
Find Kth largest in a BST - Given a BST and a number k, find the kth largest element in the BST.
Binary Tree Diameter
Given a Binary Tree, Return an integer that represents the diameter of the Binary Tree. A Diameter is the length of the longest path in the Binary Tre...
Given the root of a binary tree and a node in it, return the in-order successor of that node in the BST. If the given node has no in-order successor i...
Depth First Search
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting s...
Construct a Binary Search Tree and implement that implements insert, search, traverse and delete methods.