## traveling salesman problem dynamic programming

Traveling salesman problem dynamic programming. The tsp problem is considered to be difficult problem in computer science. Let us understand the classical traveling salesman problem with the help of...

## traveling salesman problem Brute force and dynamic programming

Traveling salesman problem Brute force and dynamic programming: Given a set of cities and the distances between them, find the shortest path visiting each of a given set of...

## how to print all paths in a directed graph

“how to print all paths in a directed graph” is famous question asked in programming interview. Given a directed graph write a c program to find all paths between...

## How to solve “Ones and zeros” Spoj Problem.

The problem published at http://www.spoj.com/problems/ONEZERO/ is very interesting because thinking its efficient solution using BFS is a complex task for seasonal programmer. I actually called seasonal because most or...

## Odd Sum Problem from UVa Online Judge

Write a c program to find the sum of all odd integers in a given range.For example, the summation of all the odd integers in the range is...

## Find the number of knight’s attacks in chess board

Given a chess board section of 5×5 size find the number of attacks can be done by knight, where 0 represents empty location and 1 represents occupied location by...

## Find shape in matrix

Given a mtarix of size MxN, filled with 0s and 1s, representing 0 as black and 1 as white. find the number of shapes in it. The shape is...

## Draw circle in Matrix in c

Circle in matrix Given a MxN matrix filled with all 0s. how to draw a circle with given radius and center. The radius will be a positive number and...

## Maximum size square sub-matrix problem

Maximum size square sub-matrix problem, given an input matrix filled with 0 and 1. find the largest square sub-matrix with all 1s. For example 1. The largest square...

## Rat at Maze problem

Given a MxN maze as binary matrix where each block is either 0 or 1. 0 means wall and 1 means entry. A rat starts from source maze and...