# strongly-connected-components

Given a directed graph, splits it into strongly connected components.

## Example

`var scc = var adjacencyList = 4 // 0 02 // 1 13 // 2 2 // 3 1 // 4 46 // 5 52 // 6 763 // 7 console`

## Install

```
npm install strongly-connected-components
```

## API

`require("strongly-connected-components")(adjacencyList)`

Computes the strongly connected components of a graph using Tarjan's algorithm.

`adjacencyList`

is an array of lists representing the directed edges of the graph

**Returns** An object containing:

`components`

: an array of arrays representing the partitioning of the vertices in the graph into connected components.`adjacencyList`

: an array lists representing the directed edges of the directed acyclic graph between the strongly connected components

## Credits

(c) 2013 Mikola Lysenko. MIT License. Based on the implementation of Tarjan's algorithm on Wikipedia.