Skip to content

sohail0992/js-algorithms

Repository files navigation

Installation

  • Install Node and NPM.
  • Install mocha gloabllay npm install mocha -g.
  • clone this repository.
  • cd into the cloned directory and run npm install.

Directory Structure

For LeetCode

  • open LeetCode Directory
  • open the directory with problem name.
  • each directory has a
    • test.js file with test cases. You can add custom test to testSamples in specified format.
    • problem-name-solution.js file with solution.

For Algrothems base on dataStructure

  • Open directory with name sorted.
  • Select one of dataStructure.
  • Each data structure is again distrubted by the problems from different sources. e.g you will find Codelity directory insider Array.

To Run test

  • cd into directory of problem and run mocha