Skip to Main Content
Data Structures Using C, 2nd Edition by Pearson
book

Data Structures Using C, 2nd Edition by Pearson

by A. K. Sharma
May 2024
Intermediate to advanced content levelIntermediate to advanced
521 pages
14h 12m
English
Pearson India
Content preview from Data Structures Using C, 2nd Edition by Pearson
Graphs 389
int i, result=0;
for (i=0; i<= last; i++)
{
if (Q[i] == vertex)
{ result= 1;
break;}
}
return result;
}
void addVisited (char Q[], int *last, char vertex)
{
*last = *last + 1;
Q[*last] = vertex;
}
void addNotVisited (char Q[], int *first, char vertex)
{
*first = *first − 1;
Q[*first] = vertex;
}
void dispVisited (char Q[], int last)
{
int i;
printf (“\n The visited nodes are ...”);
for (i =0; i <= last; i++)
printf (“ %c “, Q[i]);
}
char removeNode (char Q[], int *first)
{
char ch;
ch = Q[*first];
Q[*first] = ‘#’;
*first = *first + 1;
return ch;
}
int findPos (char adjMat[8][8], char vertex)
{
int i;
for (i = 0; i <= ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Structures Using C

Data Structures Using C

Samir Kumar Bandyopadhyay, Kashi Nath Dey
Intermediate C Programming, 2nd Edition

Intermediate C Programming, 2nd Edition

Yung-Hsiang Lu, George K. Thiruvathukal

Publisher Resources

ISBN: 9781299831582