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();
	DF_Traversal();
}/*End of main()*/