Skip to content

rewanthtammana/nodejs-assessment-solutions

default
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

coding-round

NodeJS(v6.10.0) and npm(3.10.10) has been used to solve the challenges.

Dependencies installation

npm install

Execution guide

Question 1 solution: node .\Question-1\solution.js or cd Question-1; node solution.js

Question 2 solution: node .\Question-2\solution.js or cd Question-2; node solution.js

Test suite Execution guide

npm test

Questions

1. - Write a program that will print three elements in an array whose sum is equal to a given number.

2. - I have some friends records in a text file (friends.json) -- one friend per line, JSON-encoded. I want to invite any friends within 100km of our Bangalore office which is almost like our home (GPS coordinates 12.9611159,77.6362214) for some food and drinks on us. Write a program that will read the full list of friends and output the names and user ids of matching friends (within 100km), sorted by user id (ascending).

The solutions are being disclosed only to show my ability to write good code. There are test suites, edge cases, modularity, etc in the solutions.

About

Contains solutions to interview questions which proves my ability to write modular and elegant code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published