{"id":29574655,"url":"https://github.com/lndgalante/codewars-katas","last_synced_at":"2025-07-19T08:39:27.591Z","repository":{"id":44344591,"uuid":"103589502","full_name":"lndgalante/codewars-katas","owner":"lndgalante","description":"🥋 Codewars katas ark","archived":false,"fork":false,"pushed_at":"2023-05-11T02:40:59.000Z","size":1914,"stargazers_count":304,"open_issues_count":1,"forks_count":88,"subscribers_count":18,"default_branch":"master","last_synced_at":"2023-11-07T14:32:10.909Z","etag":null,"topics":["algorithms","codewars","es2015","javascript","katas"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lndgalante.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-14T22:51:39.000Z","updated_at":"2023-10-26T13:50:08.000Z","dependencies_parsed_at":"2023-02-14T10:17:26.560Z","dependency_job_id":null,"html_url":"https://github.com/lndgalante/codewars-katas","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/lndgalante/codewars-katas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lndgalante%2Fcodewars-katas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lndgalante%2Fcodewars-katas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lndgalante%2Fcodewars-katas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lndgalante%2Fcodewars-katas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lndgalante","download_url":"https://codeload.github.com/lndgalante/codewars-katas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lndgalante%2Fcodewars-katas/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265905116,"owners_count":23846696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","codewars","es2015","javascript","katas"],"created_at":"2025-07-19T08:39:27.062Z","updated_at":"2025-07-19T08:39:27.586Z","avatar_url":"https://github.com/lndgalante.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003eCodewars Katas\u003c/h1\u003e\n\n\u003ch6 align=\"center\"\u003e\n  Solutions for Codewars katas\n\u003c/h6\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/sindresorhus/xo\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/prettier/prettier\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://david-dm.org/lndgalante/codewars-katas.svg\"\u003e\n    \u003cimg src=\"https://david-dm.org/lndgalante/codewars-katas.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://david-dm.org/lndgalante/codewars-katas/dev-status.svg\"\u003e\n    \u003cimg src=\"https://david-dm.org/lndgalante/codewars-katas/dev-status.svg?style=flat-square\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n### Table of Contents\n\n- [Introduction](#introduction)\n- [Disclaimer](#disclaimer)\n- [Vocabulary](#vocabulary)\n- [Node.js \u0026 ES6+ Support](#node.js-\u0026-es6+-support)\n- [Purpose](#purpose)\n- [Repository Structure](#repository-structure)\n- [Global Index](#global-index)\n- [Create a new Kata](#create-a-new-kata)\n- [Test your might](#test-your-might)\n- [Performance tests](#performance-tests)\n- [Development Dependencies](#development-dependencies)\n- [Learning Resources](#learning-resources)\n- [Tips](#tips-\u0026-tricks)\n- [More Learning Resources](#more-learning-resources)\n- [Similar Platforms](#similar-platforms)\n- [Contributors](#contributors)\n- [License](#license)\n\n### Introduction\n\nSolutions with tests, tips and tutorials for \u003ca href=\"https://www.codewars.com\"\u003eCodewars\u003c/a\u003e katas.\nAlmost 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.\n\n### Disclaimer\n\n- 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\n\n* Codewarriors should not submit your solutions as their own\n\n- You will not be accepting contributions of any form to this repo\n\n* Creating a repository like this is discouraged by Codewars\n\n### Vocabulary\n\n- Kata: is an algorithm you have to solve in any programming language you desire\n\n- Kyu: is a digit that determines kata difficulty level as well as the user rank on the platform\n\n### Node.js \u0026 ES6+ Support\n\nThe current Node versions [available](https://github.com/Codewars/codewars.com/wiki/Language-JavaScript) are the following [Node.js v6.x](https://kangax.github.io/compat-table/es6/#node6_5), [Node.js v8.x](https://kangax.github.io/compat-table/es6/#node8_7) and [Node.js v10.x](https://kangax.github.io/compat-table/es6/#node10_9)\n\n### Purpose\n\nPracticing 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.\nI highly recommend the [Tech Interview Handbook](https://github.com/yangshun/tech-interview-handbook) which will help you ace your next technical interview.\n\n### Repository Structure\n\nThere's a folder for each kata nested in its own kyu\n\n```ascii\n├── 8-kyu/\n│   ├── Mr. Freeze/\n│   │   ├── index.js\n│   │   └── index.test.js\n│   └── ...\n│\n├── 7-kyu/\n│   ├── Binary Addition/\n│   │   ├── index.js\n│   │   └── index.test.js\n│   └── ...\n```\n\n### Global Index\n\nThis index will help you find all katas ordered alphabetically with a link to the kata folder.\n\n- ✅ [8 Kyu - Index](https://github.com/lndgalante/codewars-katas/tree/master/lib/index/8-kyu.md)\n\n* 🚧 [7 Kyu - Index](https://github.com/lndgalante/codewars-katas/tree/master/lib/index/7-kyu.md)\n\n- ⏸️ [6 Kyu - Index](https://github.com/lndgalante/codewars-katas/tree/master/lib/index/6-kyu.md)\n\n* ⏸️ [5 Kyu - Index](https://github.com/lndgalante/codewars-katas/tree/master/lib/index/5-kyu.md)\n\nNotes:\n\n- ✅ All completed\n- 🚧 Work in progress\n- ⏸️ Paused until last WIP is completed\n\nTo update the global index run\n\n```bash\n\u003e npm run update-index\n```\n\n### Create a new Kata\n\nSince the kata generator uses some dependencies so you should install those first\n\n```bash\n\u003e npm run install-generator-deps\n```\n\nTo generate a new folder with an `index.js` and `index.test.js` run\n\n```bash\n\u003e npm run create-kata [kata link]\n```\n\nIn example\n\n```bash\n\u003e npm run create-kata https://www.codewars.com/kata/drying-potatoes/train/javascript\n```\n\nSince this is a 7-kyu kata it will appear under this folder as a folder with its own title \"Drying Potatoes\".\n\n### Test your Might\n\nIf you want to test in watch mode uncommitted files\n\n```bash\n\u003e npm run test-watch\n```\n\n### Performance tests\n\nCheck [Perflink](https://perf.link/) if you want to compare performance between long and short solutions.\n\n### Development Dependencies\n\n- Code Linting: [XO](https://github.com/sindresorhus/xo)\n- Code Formatting: [Prettier](https://github.com/prettier/prettier)\n- Utilities: [Lodash](https://github.com/lodash/lodash) \u0026 [Ramda](https://github.com/ramda/ramda)\n- Pre-commit hook: [Husky](https://github.com/typicode/husky)\n- Testing: [Jest](https://github.com/facebook/jest) \u0026 [Jest-extended](https://github.com/jest-community/jest-extended)\n- Types definitions for Jest: [Types/jest](https://www.npmjs.com/package/@types/jest)\n\nI also use [Quokka](https://quokkajs.com) Pro Edition for rapid prototyping.\nAlso I recommend you Quokka Pro that has [Live Comments](https://medium.com/@artem.govorov/using-live-code-comments-to-quickly-measure-code-performance-with-wallaby-js-and-quokka-js-7931a896133).\n\n### Tips \u0026 Tricks\n\n1.  Katas has `tags` that could help you in advance to know what to use.\n    For example you could solve this kata using regular expressions.\n\n    ![Codewars tags](https://image.ibb.co/ekxm96/www_codewars_com_kata_search_my_languages_q_r_7_xids_completed_beta_false_order_by_total_completed_desc.png)\n\n2)  Katas could have some issues that goes beyond your implementation. If you're stuck check the `Issues`.\n    Just click where it says `1 Issue Reported` above the `Instructions`.\n\n    ![Codewars issues](https://image.ibb.co/b65pU6/www_codewars_com_kata_sort_the_gift_code_train_javascript.png)\n\n3.  Finally check the `discussions` in case the Instructions aren't really clear.\n    Click on the `Discuss` button under the `Sample Tests`.\n\n    ![Codewars issues](https://image.ibb.co/j6okmm/www_codewars_com_kata_sort_the_gift_code_train_javascript_1.png)\n\n4)  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.\n\n5.  If you check my solutions the \"Long Solution\" maybe is longer than the \"Short Solution\" but is more readable.\n\n6)  If you want to check what solution is faster use [jsPerf](https://jsperf.com) or [JSBench](https://jsbench.me)\n\n### Learning Resources\n\n- Regular Expressions / RegEx\n\n  - [Awesome RegEx](https://github.com/aloisdg/awesome-regex)\n  - [Regular Expressions - Eloquent JavaScript](https://eloquentjavascript.net/09_regexp.html)\n  - [Regular Expressions - The Modern JavaScript Tutorial](https://javascript.info/regexp-introduction)\n  - [Breaking the Ice With Regular Expressions - CodeSchool](https://www.pluralsight.com/courses/code-school-breaking-the-ice-with-regular-expressions)\n  - [RegExp The Ultra Basics in JavaScript](https://www.youtube.com/watch?v=VrT3TRDDE4M)\n\n* ES6 / ES2015\n\n  - [ES6 Katas - TDDbin](http://es6katas.org)\n  - [ES6 for Everyone - Wes Bos](https://es6.io)\n  - [Modern JavaScript Cheatsheet - Beaudru Manuel](https://github.com/mbeaudru/modern-js-cheatsheet)\n\n- Array \u0026 Objects\n  - [Array Explorer - Sarah Drasner](https://sdras.github.io/array-explorer)\n  - [Object Explorer - Sarah Drasner](https://sdras.github.io/object-explorer)\n\n* Good Practices\n  - [Clean Code JavaScript - Ryan McDermott](https://github.com/ryanmcdermott/clean-code-javascript)\n\n### More Helpful Resources\n\n- [1LoC Snippets](https://1loc.dev/)\n- [RegEx Snippets](https://github.com/jeffreyshen19/RegEx-Snippets)\n- [Learn RegEx](https://github.com/zeeshanu/learn-regex)\n- [JavaScript Arrays Cheatsheet](https://devhints.io/js-array)\n- [JavaScript Cheatsheet](https://github.com/LeCoupa/awesome-cheatsheets/blob/master/languages/javascript.js)\n- [30 Seconds of Code](https://github.com/Chalarangelo/30-seconds-of-code)\n- [Codewars Gitter](https://gitter.im/Codewars/codewars.com)\n- [Algos Explained](https://www.youtube.com/channel/UCwsRKWt23kxOL1Fb73i0uUg/videos)\n- [A curated list of code katas](https://github.com/gamontal/awesome-katas)\n- [Algorithms solved in many languages](https://github.com/marcosfede/algorithms)\n- [JavaScript Algorithms and Data Structures](https://github.com/trekhleb/javascript-algorithms)\n- [A JavaScript optimization handbook](https://mythbusters.js.org)\n\n### Similar Plattforms\n\n- [Codility](https://codility.com)\n- [Exercism](http://exercism.io)\n- [CodeEval](https://www.codeeval.com)\n- [LeetCode](https://leetcode.com)\n- [CodeChef](https://www.codechef.com)\n- [CoderByte](https://coderbyte.com)\n- [CodeFights](https://codefights.com)\n- [HackerRank](https://www.hackerrank.com)\n- [KataLog](https://kata-log.rocks)\n\n### Contributors\n\nFeel free to open issues or send PRs\n\n[![](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/images/0)](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/links/0)[![](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/images/1)](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/links/1)[![](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/images/2)](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/links/2)[![](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/images/3)](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/links/3)[![](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/images/4)](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/links/4)[![](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/images/5)](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/links/5)[![](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/images/6)](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/links/6)[![](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/images/7)](https://sourcerer.io/fame/lndgalante/lndgalante/codewars-katas/links/7)\n\n### License\n\nMIT © **[`Leonardo Galante`](https://leonardogalante.com)**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flndgalante%2Fcodewars-katas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flndgalante%2Fcodewars-katas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flndgalante%2Fcodewars-katas/lists"}