Pages

Sunday, September 18, 2011

Download Visual Studio 2006 Free

Download Visual Studio 2006 Free and Install Using Custom Settings.

click here to download

Wednesday, July 13, 2011

Difference between BFS and DFS


Breadth-first search (BFS) and depth-first search (DFS) are the two algorithms used for traversing and searching a node in a graph. They can also be used to find out whether a node is reachable from given node or not.
In depth-first search traversal  we try to go far from the root node.  Nodes are visited by going through the depth of the tree from starting node. When we reach at the node which does not have any children then we backtrack and visit the child nodes on another branch.
The depth-first search traversal of above graph will be:

A  B  E  F  C  D

Tuesday, June 14, 2011

An Introduction to Programming Contest (Various Input\Output Systems)

If you are a beginner, you will find it very unusual sometime regarding taking inputs. Some problems will say, "The Program will continue till the END OF FILE:, some will say "Stop taking input if N=0" etc etc. Some important ways to take input will be described here:

1. If you are said to take an integer number (n) as input till the End Of File/ (EOF):
 
 
int main(){
    int n;
    while(scanf("%d", &n)!=EOF){
         ...........
         ...........
    }
    return 0;
}