- Introduction
- Disclaimer
- Vocabulary
- Node.js & ES6+ Support
- Purpose
- Repository Structure
- Global Index
- Create a new Kata
- Test your might
- Performance tests
- Development Dependencies
- Learning Resources
- Tips
- More Learning Resources
- Similar Platforms
- Contributors
- License
Solutions with tests, tips and tutorials for Codewars katas. Almost every kata has a long solution and a shorter one, IMHO a long descriptive solution it's preferred over a cryptic one-liner, unless it's understandable for your entire team.
- Codewarriors are strongly encouraged not to look at your solutions to Kata until they have completed it themselves or at least took the time to think about their own approaches
- Codewarriors should not submit your solutions as their own
- You will not be accepting contributions of any form to this repo
- Creating a repository like this is discouraged by Codewars
-
Kata: is an algorithm you have to solve in any programming language you desire
-
Kyu: is a digit that determines kata difficulty level as well as the user rank on the platform
The current Node versions available are the following Node.js v6.x, Node.js v8.x and Node.js v10.x
Practicing katas could help you to improve your algorithmic thinking. It could also help at interviews being more confident and learning a few tricks of your preferred language. I highly recommend the Tech Interview Handbook which will help you ace your next technical interview.
There's a folder for each kata nested in its own kyu
βββ 8-kyu/
β βββ Mr. Freeze/
β β βββ index.js
β β βββ index.test.js
β βββ ...
β
βββ 7-kyu/
β βββ Binary Addition/
β β βββ index.js
β β βββ index.test.js
β βββ ...
This index will help you find all katas ordered alphabetically with a link to the kata folder.
- π§ 7 Kyu - Index
- βΈοΈ 6 Kyu - Index
- βΈοΈ 5 Kyu - Index
Notes:
- β All completed
- π§ Work in progress
- βΈοΈ Paused until last WIP is completed
To update the global index run
> npm run update-index
Since the kata generator uses some dependencies so you should install those first
> npm run install-generator-deps
To generate a new folder with an index.js
and index.test.js
run
> npm run create-kata [kata link]
In example
> npm run create-kata https://www.codewars.com/kata/drying-potatoes/train/javascript
Since this is a 7-kyu kata it will appear under this folder as a folder with its own title "Drying Potatoes".
If you want to test in watch mode uncommitted files
> npm run test-watch
Check Perflink if you want to compare performance between long and short solutions.
- Code Linting: XO
- Code Formatting: Prettier
- Utilities: Lodash & Ramda
- Pre-commit hook: Husky
- Testing: Jest & Jest-extended
- Types definitions for Jest: Types/jest
I also use Quokka Pro Edition for rapid prototyping. Also I recommend you Quokka Pro that has Live Comments.
-
Katas has
tags
that could help you in advance to know what to use. For example you could solve this kata using regular expressions.
-
Katas could have some issues that goes beyond your implementation. If you're stuck check the
Issues
. Just click where it says1 Issue Reported
above theInstructions
.
-
Finally check the
discussions
in case the Instructions aren't really clear. Click on theDiscuss
button under theSample Tests
.
- After you submit your final solution check the Solutions to learn from other alternatives. If you don't understand them you can leave a comment or check the discussions of each one. Try to learn from these solutions and improve your current one or create a Short Solution of your own.
- If you check my solutions the "Long Solution" maybe is longer than the "Short Solution" but is more readable.
-
Regular Expressions / RegEx
-
ES6 / ES2015
- Array & Objects
- Good Practices
- RegEx Snippets
- Learn RegEx
- JavaScript Arrays Cheatsheet
- JavaScript Cheatsheet
- 30 Seconds of Code
- Codewars Gitter
- Algos Explained
- A curated list of code katas
- Algorithms solved in many languages
- JavaScript Algorithms and Data Structures
- A JavaScript optimization handbook
Feel free to open issues or send PRs
MIT Β© Leonardo Galante