Browsing Category

# Coding Problems

112 posts

## Palindrome Number in C, Java, and Python

A palindrome number is a number that remains the same when digits are reversed. For example, the number…

## GCD of Two Numbers (C, Python, Java) With Examples

Problem Statement Given two non-negative integers a and b, we have to find their GCD (greatest common divisor),i.e.…

## Travelling Salesman Problem (TSP)

Problem Statement Given a set of cities and the distance between every pair of cities as an adjacency…

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:…