Skip to content

This repository contains solutions to Leetcode's problems using Javascript.

Notifications You must be signed in to change notification settings

harchcode/leetcode-solution-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains solutions to Leetcode's problems using Javascript. Thank you very much for your contribution!

How to contribute

  • Star this repo.
  • Go to Leetcode and sign up there.
  • Go to problems page.
  • Choose any problems to solve. Before you decide to contribute here, please make sure the problem you choose isn't already solved in this repo.
  • Make PR.

How to run test

  • Install NodeJS.
  • Clone this repo.
  • Go into the project's directory.
  • Run npm install.
  • Run npm run test:all to run all test.
  • To run test on individual file, run npm test <name-of-file>. For example, to run test on 476-number-complement.js, run npm test leetcode/476-number-complement.js.

Conventions

  • Make sure to only add solutions into leetcode directory.
  • Solution's file name should be <problem-no>-<title-of-problem>.js, for example 476-number-complement.js.
  • Make sure to copy the description of the problem into the file as comment. Please take some time to make it pretty.
  • After the description, comes the solution.
  • After the solution, comes the tests. We use Ava for the test.

About

This repository contains solutions to Leetcode's problems using Javascript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published