Git Product home page Git Product logo

algo-find-pair's Introduction

Find Pair

Find the pairs in an array whose sum of a number N

Task

create a function that finds pairs of integers from a list that sum to a given value. The function will take as input the list of numbers as well as the target sum.

create a command line tool that takes as command line arguments a comma separated list of integers, and the target integer.

You can assume that all input values are integers. You can assume that there aren't any repeat values in the list.

How to run tests

npm run test

How to run on command line with custom inputs

and run with custom inputs -a -> numbers separated by comma, example: 1,2,3,4 -n -> integer number, example: 4

running with npx

npx algo-find-pair -a 1,9,5,0,20,-4,12,16,7 -n 12  

execution animation

running from source code

Before any execution we need install dependencies

npm install
node . -a 1,9,5,0,20,-4,12,16,7 -n 12  

algo-find-pair's People

Contributors

clystian avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.