Skip to content

A JavaScript framework for running HackerRank challenges on your local machine.

License

Notifications You must be signed in to change notification settings

itho/hackerrank.js

Repository files navigation

hackerrank.js

A JavaScript framework for running HackerRank challenges on your local machine.

Requirements:

  • Node v6+

Installation:

# Clone/fork the repository
git clone --depth 1 https://github.com/itho/hackerrank.js.git

# Change directory
cd hackerrank

# Install dependencies
npm install

Usage:

  1. On all HackerRank challenges, you can see a link on the right side bar "Download sample test cases". Clicking this will start the download of the available input & output files.
  2. Create a folder for the challenge like /challenges/solve-me-first/. Move the downloaded input and output folders here along with your solution named solution.js. Copy in the stub from HackerRank and get hacking!
  3. Run the commands below from the root of the project.
# If your codes outputs to the console/stdout
node hackerrank.js challenges/solve-me-first --console
node hackerrank.js challenges/solve-me-first --stdout

# If your code outputs to a file
node hackerrank.js challenges/solve-me-first --file
  1. You can also add additional/custom testcases. Just ensure that the input and output filenames match.

Examples:

License

itho/hackerrank is MIT licensed.

About

A JavaScript framework for running HackerRank challenges on your local machine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •