# find-pair-sum

> Find all the pair of numbers that when summed equal the target value in O(N).

Latest version **0.0.2** (published 2016-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install find-pair-sum
pnpm add find-pair-sum
yarn add find-pair-sum
bun add find-pair-sum
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2016-04-27 |
| First published | 2015-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Miguel Mota |
| Maintainers | miguelmota |
| Keywords | sum, pair, two, array, math |

## Links

- npm: https://www.npmjs.com/package/find-pair-sum
- Repository: https://github.com/miguelmota/find-pair-sum
- Issues: https://github.com/miguelmota/find-pair-sum/issues
- npm.io page: https://npm.io/package/find-pair-sum

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2016-04-27
- 0.0.1 — 2015-10-23

## README

# find-pair-sum

> Find all the pair of numbers that when summed equal the target value in O(N).

# Install

```bash
npm install find-pair-sum
```

```bash
bower install find-pair-sum
```

# Usage

```javascript
var findPairSum = require('find-pair-sum');

console.log(findPairSum([5,10,3,4,6,9,9], 16));
/*
  [
    [ { index: 4, value: 6 }, { index: 1, value: 10 } ]
  ]
*/

console.log(findPairSum([3,5,10,3,4,2,8,4,5,6], 10));
/*
[
  [ { index: 6, value: 8 }, { index: 5, value: 2 } ],
  [ { index: 8, value: 5 }, { index: 1, value: 5 } ],
  [ { index: 9, value: 6 }, { index: 7, value: 4 } ]
]
*/

console.log(findPairSum([5,10,4,6,9,1], 8)); // []
```

# Test

```bash
npm test
```

# License

MIT

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