## Construct a full binary tree from preorder sequence with leaf node information

Write an efficient algorithm to construct a full binary tree from a sequence of keys representing preorder traversal, and a boolean array which determines if the corresponding key in the preorder traversal is a leaf node or an internal node.

## Check if a given sequence represents preorder traversal of a BST

Given a distinct sequence of keys, check if it can represent a preorder traversal of a binary search tree (BST).

## Convert a Ternary Tree to a Doubly Linked List

Write an efficient algorithm to convert a ternary tree into a doubly linked list. A ternary tree is a tree data structure in which each node has at most three child nodes distinguished as left, mid and right.

## Construct a full binary tree from a preorder and postorder sequence

A full binary tree is a tree in which every node has either 0 or 2 children. Write an efficient algorithm to construct a full binary tree from given preorder and postorder sequence.

## Depth first search (DFS) vs Breadth first search (BFS)

In this post, we will see the difference between Depth first search (DFS) and Breadth first search (BFS) algorithm which are used to traverse/search tree or graph data structure.

## Count subtrees in a BST whose nodes lies within a given range

Given a BST, count subtrees in it whose nodes lies within a given range.   For example, consider below BST. The number of subtrees with nodes in the range [5, 20] are 6.

## Construct a Cartesian Tree from In-order Traversal

Write an efficient algorithm to construct a Cartesian tree from in-order traversal. A Cartesian tree is a binary tree with the heap property: the parent of any node has smaller value than the node itself.

## Build a Binary Search Tree from a Postorder Sequence

Given a distinct sequence of keys which represents postorder traversal of a binary search tree, construct the tree from the postorder sequence.

## Build a Binary Search Tree from a Preorder Sequence

Given a distinct sequence of keys which represents preorder traversal of a binary search tree (BST), construct the tree from the postorder sequence.

## Generate list of possible words from a character matrix

Given a M x N boggle board, find list of all possible words that can be formed by a sequence of adjacent characters on the the board.

## Set next pointer to inorder successor of all nodes in binary tree

Given a binary tree where each node has one extra pointer next, set next pointer to inorder successor for all nodes in the binary tree.

## Efficiently print all nodes between two given levels in a binary tree

Given a binary tree, efficiently print all nodes between two given levels in a binary tree. The nodes for any level should be printed from left to right.