JavaScript Algorithms and Data Structures: Graph

Graph is a non-linear data structure that represents a collection of nodes (vertices) connected by edges. Learn how to implement it in JavaScript!

In computer science, a graph is an abstract data type that is meant to implement the undirected graph and directed graph concepts from mathematics, specifically the field of graph theory

A graph data structure consists of a finite (and possibly mutable) set of vertices or nodes or points, together with a set of unordered pairs of these vertices for an undirected graph or a set of ordered pairs for a directed graph. These pairs are known as edges, arcs, or lines for an undirected graph and as arrows, directed edges, directed arcs, or directed lines for a directed graph. The vertices may be part of the graph structure, or may be external entities represented by integer indices or references.

Graph

References

The Original Article can be found on https://github.com

Read this in other languages: 简体中文, Русский, Português

#javascript #algorithms #datastructures #graph

JavaScript Algorithms and Data Structures: Graph
3.45 GEEK