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
374 Data Structures Using C
(2) Deletion: Similarly, a node or an edge or both can be deleted from an existing graph.
(3) Traversal: A graph may be traversed for many purposes—to search a path, to search a goal, to
establish a shortest path between two given nodes, etc.
8.4.1 Insertion Operation
The insertion of a vertex and its associated edge with other vertices in an adjacency matrix involves
the following operations:
(1) Add a row for the new vertex.
(2) Add a column for the new vertex.
(3) Make appropriate entries into the rows and columns of the adjacency matrix for the new edges.
Consider the graph given in Figure 8.16.
Fig. 8.16 Insertion ...
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