## Smart Frog codechef problem solution by backtracking

Backtracking problem is not easier to understand. For an average programmer practice is the only way to become an expert at backtracking problem solution. The article “Smart Frog codechef...

## max heap and min heap c program

Max heap and min heap is a complete binary tree with special property. Max Heap, A complete binary tree where each node value is less than or equal to...

## subset sum problem using backtracking

We have discussed the “subset sum problem using dynamic programming” . We can solve subset sum problem using backtracking algorithm. For example if there is set S{ 1,3,9,2} and...

## print combinations of string taken r at a time in c

write a program to print combinations of string taken r at a time in c. According to wikipedia “a combination is a way of selecting items from a collection,...

## permutation of a string using backtracking

write c program for all permutation of a string using backtracking. Permutation means all possible re-arrangements of a collection of objects, where the order is important. for example {a,b,c}...

## line segment intersection

Line segment intersection is classic computer science problem related to computer graphics or computed geometry. Your given two line segments and you need to write c or c++ program...

## maximum submatrix sum problem

Given a 2D matrix find the maximum submatrix sum in it. The matrix is containing positive and negative integers. For example The maximum submatrix sum is 15 in the...

## sieve of eratosthenes

sieve of eratosthenes is one of oldest and efficient algorithm for generating all prime numbers less than or equal to a given number N. For example if given number...

## c program for bfs using adjacency matrix

write c program for bfs using adjacency matrix. For example the breadth first search of below graph from 0th vertex would be 0 1 2 6 3 4. We...

## Max flow problem Ford Fulkerson algorithm

Max flow problem The max flow problem can be defined as “Given a flow network as directed graph, where each edge has a capacity greater than 0 and two...