Browsing Category

# Coding Problems

112 posts

Problem Statement Given 2 numbers, where each digit is represented by nodes of a LinkedList, find the sum…

## Serialize and Deserialize a Binary Tree

Problem Statement Given a binary tree, serialize and deserialize the binary tree. Serialize: Write the tree into a…

## Delete Node From Binary Search Tree

Problem Statement Given a binary search tree and a key value. The task is to delete the given…

## Find Median in a Stream

Problem Statement Given are some integers, which are read from the data stream. The task is to find…

## Friends Pairing Problem (Solution)

Problem Statement Given a total of n friends, each friend can either remain single or can be paired…

## N-ary Tree – Tree Data Structures

Introduction N-ary trees are tree data structures that allow us to have up to n children nodes for…

## Depth First Search – Traversal Of The Graph

Problem Statement Given an undirected, unweighted graph print the DFS traversal of the graph. Sample Test CasesInput 1:…

## Reverse Level Order Traversal

Problem Statement Given a binary tree, return the reverse level order traversal of its nodes’ values. (i.e, from…

## Sort String (C++, Java, and Python)

Problem Statement Given a string S of lowercase English characters ‘a’ – ‘z’. The task is to sort…

## Tree Diameter – Diameter of a Binary Tree

Problem Statement Given a binary tree, find the diameter of the tree. Diameter: The diameter of a tree…