An open API service indexing awesome lists of open source software.

https://github.com/ternaus/connected-components-js

Operations with connected components in javascript
https://github.com/ternaus/connected-components-js

Last synced: 2 months ago
JSON representation

Operations with connected components in javascript

Awesome Lists containing this project

README

          

# Library to work with connected components of the undirected graph

## Installation

```bash
npm install connected-components-js
```

```javascript
const g = new Graph();
g.addEdge("a", "b")
g.addEdges([["a", "d"], ["e", "f"], ["k", "l"]])

g.addNode("c")
g.addNodes(["t", "f", "m"])

const components = g.computeComponents()
```