/algo

My solutions to common algorithm problems

Primary LanguageJavaScript

@narendras/algo

Collection of solutions for various algorithmic challenges, with explanations and playground.

What's in the box?

Each algorithm problem is categorized by the data structure that it is concerned with. This categorization is based on wherever I got the original problem from.

[src]
└── [category]
    └── [problem-name]
        ├── README.md
        ├── index.js
        └── [problem-name].test.js

Inside a problem's folder:

  • index.js — The file containing the solution itself.
  • [problem name].test.js — Tests for the problem.
  • README.md — The problem description and links to the original problem.

Running the Solutions

Running alg <problem name> <input> allows you to test my solution with your own custom inputs directly on the command line.

This is also documented in each problem's README.md.