This repo contains a number of problems for which you are required to provide:
- An English explanation of the possible solution
- A pseudo code version of the solution
- And finally, the javascript version of the solution
- To encourage you to think clearly about the problems you encounter
- Enable you to turn plain English solutions into their Javascript equivalents
A general approach to problem solving is as follows:
- Understand the problem
- Draw experience from related problems to plan an approach to this problem
- Try to solve the problem, based on 1. and 2.
- Check your solution. Is it correct?
This repository requires you to use that approach.
This repo contains a number of problems. To solve the problems, do the following:
- Fork this repository and clone the fork to your machine
- The problems are described in the ./src directory. They are nominally categorised as easy, medium, and hard.
- For each problem:
- Read a description of the problem in the file problem.md
- Add a plain English description of the proposed solution in the file plain.md
- Add a pseudo code version of the plain English solution in the file pseudo.md
- Only after you've completed steps 2. and 3. should you attempt to code up a javascript solution in the file solution.js
- Your javascript should be in the form of a function that returns your solution
- Is your solution correct? If you're able, try checking your answer with different inputs
- For each problem:
Hint: An example of a completed exercise is in the directory src/easy/scores.