equinumerica

1.1.1 • Public • Published

equinumerica

npm XO code style Build Status codecov

Get the indices in an array where the sum of the preceding elements is equal to the sum of the remaining elements

Given an array of integers, returns any indices, such that 0 ≤ P < N and the sum of the elements in the lower indices is equal to the sum of the elements in the higher indices. In the event the array has no such points, NaN will be returned.

Installation

npm install equinumerica

Usage

const equinumerica = require('equinumerica');

equinumerica([-1, 3, -4, 5, 1, -6, 2, 1]); //--> [1, 3, 7]

/equinumerica/

    Package Sidebar

    Install

    npm i equinumerica

    Weekly Downloads

    3

    Version

    1.1.1

    License

    MIT

    Last publish

    Collaborators

    • jacobwarduk