Codewars

A platform for coding challenges and practice

This project is a collection of my solutions to coding challenges on Codewars. Codewars offers a wide range of problems that help improve coding skills and problem-solving abilities. I treat it as both algorithm practice and language exploration, as it allows me to experiment with different programming languages and techniques while honing my problem-solving skills.

Years

Language Rank
Ruby 4 kyu
Python 5 kyu
Java 6 kyu
Java 6 kyu
JavaScript 6 kyu
TypeScript 6 kyu
Lua 6 kyu
Elixir 6 kyu
C 6 kyu

Notable Problems

Sudoku Solver: 4 kyu - A classic problem that requires backtracking and recursion to solve. The challenge was to fill in a 9x9 grid with digits so that each column, row, and 3x3 subgrid contains all of the digits from 1 to 9. My approach involved using an iterative algorithm that checks for valid placements and backtracks when necessary.

Most frequently used words: 4 kyu - Given a string of text, the task was to find the most frequently used words. I implemented a solution that involved using only extension functions. The approach was to use a regular expression to extract words from the input string, reject any non-alphanumeric characters, and then group the words by their frequency. Finally, I sorted the groups by frequency and returned the top three most common words.

Patterns & Takeaways

A lot of these problems incentivize the use of recursive approaches, which I find to be a change of pace from the more iterative solutions I often use. Additionally, the variety of languages available on Codewars allows for experimentation with different programming paradigms and styles, which can be beneficial for improving overall coding skills, as some languages are better suited for certain types of problems and contain features that make certain problems trivial to solve.

Tags

  • ruby
  • python
  • java
  • javascript
  • typescript
  • lua
  • elixir
  • c