## Permuting Two Arrays hackerrank solution

Permuting Two Arrays hackerrank solution. The problem is simple given at https://www.hackerrank.com/challenges/two-arrays . It requires sorting. we can use qsort standard library function. To know more about qsort visit...

## find largest island area using dfs

Given a 2D matrix filled with 0 and 1, where 0 represents water and 1 represents a land. find largest island area using dfs. An island is defined as...

## How to take inputs from file using freopen and scanf

In this blog post we will know how to take inputs from file using freopen and scanf in c and c++ program. Taking inputs from file is a basic...

## c program to print all possible combinations of given characters

write a c program to print all possible combinations of given characters. For example if given characters are then ,its all possible combinations are as...

## find longest increasing subsequence using recursion

write a recursive function to find longest increasing subsequence using recursion. For example if we have sequence of { 6, 3, 4, 5, 6, 9, 8 }. The longest...

## minesweeper uva 10189 solution

problem link minesweeper uva 10189 solution Technique to solve this problem As you may have already noticed, each square may have at most 8 adjacent squares. Let us...

## find maximum path to reach from source to destination

Given a directed graph and two vertices ( source and destination ), find maximum path to reach from source to destination. For example in the below directed graph if...

## Graph coloring backtracking problem

You are given an undirected graph and two colors, black and white. write a program to find the maximum number of nodes that can be colored with black such...

## Find the number of fighting groups using dfs

There is battlefield where some different types of aliens are fighting to each other. The battlefield exists some where on different planet. A scientist is able to watch the...

## find minimum number of clicks to make monochromatic grid

A grid of size NxM where each cell of the grid is filled with some color. Find minimum number of clicks to make monochromatic grid (having one color). Problem...