#include<stdio.h>
#include<conio.h>
main()
{
int a[5],priority[5],adj[5][5]={0},i,j,k;
a[0]=3;
a[1]=4;
a[2]=5;
a[3]=7;
a[4]=10;
adj[0][1]=1;
adj[0][2]=1;
adj[0][3]=1;
adj[1][0]=1;
adj[2][0]=1;
adj[2][4]=1;
adj[3][0]=1;
adj[4][2]=1;
/*
the ads[4][4] represents the linking edges
adj[4][4]= 0 1 1 1 0
1 0 0 0 1
1 0 0 0 0
1 0 0 0 0
0 0 1 0 0
*/
/* I want a priority list based on largest number first
while following the linking edges
So that :
priority[0]=4
priority[1]=2
priority[2]=0
priority[3]=3
priority[4]=1
But HOW?
*/
}
Please help me..