kruskal algorithm program in java

import java.io.*;
class kruskal
{
public static void main(String args[])throws IOException
{
int size=20;

int nodes,v1,v2,length,i,j,n;
int g[][]=new int[size][size];
DataInputStream in=new DataInputStream(System.in);
System.out.println("Enter number of nodes in graph");
nodes=Integer.parseInt(in.readLine());
System.out.println("Enter number of edges in graph");
n=Integer.parseInt(in.readLine());
for(i=0;iFacing difficulties in understanding the program ?

Ask Your Queries in Comment Box

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *