# findconnect

> npm install findconnect

Latest version **1.0.2** (published 2017-07-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install findconnect
pnpm add findconnect
yarn add findconnect
bun add findconnect
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-07-06 |
| First published | 2017-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | gauravp16 |
| Maintainers | gauravp16 |
| Keywords | connected, network, union find, network |

## Links

- npm: https://www.npmjs.com/package/findconnect
- npm.io page: https://npm.io/package/findconnect

## Dependencies (1)

- [underscore](https://npm.io/package/underscore.md) ^1.8.3

## Recent versions

- 1.0.2 (latest) — 2017-07-06
- 1.0.1 — 2017-07-06
- 1.0.0 — 2017-07-06

## README

## Installation
npm install findconnect

## Usage
Connected allows to check if elements in different subsets are connected or not. Elements can represnt any object like friends in a social network or cities in a map. For example, if 1 and 2 are connected and 5 and 6 are connected and if 1 and 5 are connected, then all the elements are connected. It employs weighted union with path compression technique.

### Using Connected

The first step is to create a connected object.
```javascript
var Connected = require('findconnect');

var connected = new Connected(5);

connected.connect(1,2);
connected.connect(2,3);
connected.connect(5,6);
connected.connect(2,6);

connected.find(2,5);
```
## License
Licensed under MIT

---
_Source: https://npm.io/package/findconnect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
