This repository contains solutions to various LeetCode problems implemented in Clojure. The goal is to tackle algorithm challenges using Clojure, showcasing functional, concise, and idiomatic approaches.
I'm using this problem list to practice Clojure.
Each LeetCode challenge has its own implementation in a dedicated namespace.
- Clone the repository:
git clone https://github.com/edubrunaldi/clojure-leetcode.git cd clojure-leetcode
We welcome contributions! If you'd like to add your own solution to a LeetCode problem, please follow these guidelines:
-
Create a new file within the appropriate problem directory. If the problem directory doesn't exist yet, create it under
src/clojure_leetcode/
. -
Name your file according to the following convention:
by_<username>_[optional_data].clj
.
<username>
: Your GitHub username.[optional_data]
: You can add optional data like the year or a specific approach you used (e.g.,2025
,20250315
, etc..).
- Structure your solution within the file. Ensure it's a valid Clojure namespace and contains your implementation of the LeetCode problem.
Example:
Let's say you want to contribute your solution to the "Add Digits" problem. You would create a new file like this:
src/clojure_leetcode/add_digits/by_yourusername.clj
For Learners: If you are using this repository to learn Clojure through LeetCode problems, we encourage you to add a date to your filename (e.g., by_yourusername_20250315.clj). Setting a reminder to revisit these problems in a year or two can be a great way to see how your Clojure skills and problem-solving approaches have developed!