farhan.khwaja's blog

By farhan.khwaja, 14 years ago, In English
A small snippet of the code:

#include<stdio.h>
    #define maxx 101
    
    int Q[maxx];
    int first ,last;
    int node, edge;
    
    char linker[maxx][maxx];
    char var[maxx];
    int path[maxx];
    
    void Ini() {
    int i, j;
    for(i = 1; i<= node; i++) {
    for(j = 1; j<= node; j++) {
    linker[i][j] = 0;
    }
    path[i] = i;
    var[i] = 0;
    }
    }
    
    //Inserts element in the Q ie ENQUEUE
    void Insert(int n) {
    Q[last++] = n;
    last %= maxx;
    }


rest in here click:  http://codetolearn.blogspot.com/2010/12/bfs-algorithm-in-c.html
  • Vote: I like it
  • -2
  • Vote: I do not like it

| Write comment?
14 years ago, # |
Rev. 2   Vote: I like it +3 Vote: I do not like it
1. Use something like pastebin.com to publish your code
3. Use an indentation of your code
4. What is the main purpose of this post?
14 years ago, # |
  Vote: I like it 0 Vote: I do not like it
Can you show the algorithm by pascal language ??