Skip to Main Content
Introducing Data Structures with Java
book

Introducing Data Structures with Java

by David Cousins
March 2013
Intermediate to advanced content levelIntermediate to advanced
416 pages
9h 41m
English
Pearson Education India
Content preview from Introducing Data Structures with Java

13

Graphs

ch13-ufig1 Graphs

Contents

  • Non-hierarchical data structures
  • Graph representation—vertices and edges
  • Traversing graphs
  • Shortest paths—Dijkstra’s algorithm
  • Spanning trees—Kruskal’s and Prim’s algorithms
  • Implementing a Graph class
13.1 INTRODUCTION

In our exploration of data structures, we have examined ways in which items may be linked together. Each node in a list, stack or queue has a maximum of one successor and one predecessor; a node in a binary tree may be linked to a maximum of two children. These structures demonstrate a ‘hierarchy’ whose members are ordered by value (Figure 13.1) in the case of a sequential list and a binary search tree ...

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 and Algorithms Using Java

Data Structures and Algorithms Using Java

William McAllister

Publisher Resources

ISBN: 9788131758649