O'Reilly logo

Hands-On Data Structures and Algorithms with JavaScript by Kashyap Mukkamala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Types of graphs

From the preceding description, we can speculate on the types of graphs. There are way too many to cover in this chapter or even in this book. However, let's take a look at some of the most important and popular graphs, which we will be exploring with examples in this chapter:

  • Simple graphs: A simple graph is an undirected, unweighted graph that contains no loops or multi-edge (that is multiple edges between the two nodes also known as parallel edges) nodes: 
  • Undirected graphs: This is a graph in which the edge definitions are interchangeable. For example, in the following image, the edge between nodes 1 and 2 can be represented ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required