예제 #1
0
main()
{
		create_graph();
		do
		{
				printf("\n1.Breadth first traversal\n2.depth first traversal\n3.Exit\nEnter your choice :  ");
				scanf("%d",&choice);
				switch(choice)
				{
						case 1:
								printf("\nBREADTH FIRST TRAVERSAL");
								BF_Traversal();
								break;
						case 2:
								printf("\nDEPTH FIRST TRAVERSAL");
								DF_Traversal();
								break;
						case 3:
								exit(0);
						default:
								printf("\nInvalid choice!!!\n");
				}
		}while(1);
}
예제 #2
0
main()
{
	create_graph();
	BF_Traversal();
}/*End of main()*/
main()
{
	create_graph();
	BF_Traversal();
}