My solutions and test cases for programming practice in book Coding Interviews: Questions, Analysis & Solutions. It contains totally 66 questions, i will often update later. I programmed with JavaScript and run it on Node.js v6.10.2. Mocha
provides unit testing to show whether or not answer is correct.
Download this project:
$ git clone git@github.com:meior/coding-interviews.git
Install dependencies:
$ cd coding-interviews
$ npm install
Show categories and questions in project with this command:
$ npm start
This is the structure of project files:
- project
- src
- utils
- .eslintrc
- .gitignore
- index.js
- package.json
- package-lock.json
- README.md
You can find categories in src folder, which include several programming questions in them.You can find some files like these in questions folders:
- test
- arraySearch.test.js(Mocha testing script)
- data.js(test case)
- arraySearch.js(solution)
- README.md(question and analysis)
Test your code of solution by using Mocha script, you should install it globally:
$ npm install -g mocha
Run this command in questions folder:
$ mocha