## C program for odd-even sort or brick sort

Write a C program for odd-even sort or brick sort. An Odd-Even Sort or brick sort is a simple sorting algorithm. In this algorithm we compare all odd/even indexed...

## what is power set explain with example

what is power set  explain it with example? Let me ask one question. What is set? Answer is “a set is collection of distinct objects”.  Now let us define...

## 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...

## c program to check line segment intersection

write a c program to check line segment intersection. we have already discussed the line segment intersection theory on our previous post  http://wikistack.com/line-segment-intersection/. Now we know how to make...

## 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...

## Hamilton cycle and Path in graph

write a program to find Hamilton cycle and Path in graph. A Hamilton path is a path that visits each vertex of a graph ( directed or undirected )...

## Topological Sorting

A topological sort of a directed acyclic graph (in short DAG) is a linear ordering of vertices such that if DAG contains a directed edge (u,v), then u appears...

## Shortest path problem with negative weights Bellman Ford algorithm

Shortest path problem is problem of finding shortest path from given particular point/vertex to all other points or vertices in a graph. Bellman Ford algorithm is used for this...