Repo to practice leetcode style algorithms and writing tests in JavaScript.
I'll be updating this every day or so. There are 3 branches
-
Main -- This branch just has leetcode style algorithms. It is up to you to write both the tests and the solution to the problems
-
problems(with tests) -- This branch has tests already written out, you need to solve them
-
solutions -- this branch contains both tests and solutions to each problme. Use these if you ever get stuck. I'll try to comment my solutions as best as I can.
Make sure to run npm i
to install jest as a dev dependnecy.
Then to run tests, use npm run test ${test-name}
example: npm run test two_sum