Professional Documents
Culture Documents
Graph Representations - LL
Graph Representations - LL
//https://del.dog/epezivehay.pl
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct node
int nodeno;
int edgeweight;
};
int main()
int **A;
int rows,edges,snode,enode,weight;
int i;
char directed[4];
scanf("%d",&rows);
scanf("%d",&edges);
scanf("%s",directed);
for(i=0;i<rows;i++)
printf("Enter the start node, end node and weight of edge no %d\n",i);
list = convmattolist(A,rows,directed);
printadjmatrix(A,rows);
printlist(list,rows);
return 0;