This repository is a collection of programming challenges I solve to practice problem-solving, algorithms, and data structures.
Most challenges come from platforms like LeetCode and Codewars.
Each solution is implemented with clarity and often contains comments explaining the logic behind it.
- ✅ Improve logical thinking
- ✅ Master data structures and algorithms
- ✅ Prepare for coding interviews
- ✅ Build a reference library of patterns and approaches
coding-practice/
├── .github/
│ └── workflows/
│ └── auto-merge.yml
├── leetcode/
│ └── daily/
│ └── 2025-04-21-name-of-question.js
├── codewars/
│ ├── 8kyu/
│ └── 6kyu/
├── create-daily-leet.js
└── README.md-
leetcode/daily/: Contains daily LeetCode challenges.
Files are named using the formatYYYY-MM-DD-question-title.jsfor better organization and readability. -
codewars/: Contains Codewars challenges, organized by difficulty level (8kyu, 6kyu, etc.). -
README.md: This file, providing an overview of the repository and instructions for use. -
create-daily-leet.js: Script to create new exercise files automatically.
| LeetCode | Codewars |
|---|---|
This repository includes a script that automates the creation and organization of daily LeetCode challenge files. When executed, it:
- Creates a new file with the current date and formatted exercise name in the
leetcode/daily/directory. - Automatically updates the
leetcode/daily/readme.mdfile with the challenge title, a placeholder description, the approach, and a link to the solution file. - Updates with the total number of solved challenges and a direct badge counter.
Currently supported languages: JavaScript, Python, C, and Java.
-
Open your terminal and navigate to the root of the repository.
-
Run the following command to execute the script and create a new exercise file:
node create-daily-leet.js <exercise-name> <extension>
Example:
node create-daily-leet.js count-good-triplets js
This command will create:
- a file called
count-good-triplets.jsinside the appropriate directory (leetcode/daily/); - An entry in leetcode/daily/readme.md with the problem title and metadata;
- A badge in the
leetcode/daily/readme.mdfile that counts the total number of solved problems.
- a file called
-
After running the command, the file will be created, but it might not show up immediately in the VSCode file explorer.
- Ensure Node.js is installed on your system to run the script;
- If you rename or delete files manually, remember to update the readme.md files accordingly or re-run the script to regenerate them.
If the newly created file does not appear instantly in the VSCode file explorer:
-
Manually Refresh the Explorer:
- In VSCode, click the Refresh Explorer button on the file explorer pane to update the view and show the newly created file.
Or, you can reload the entire window by pressing:
Ctrl + R(Windows/Linux) orCmd + R(macOS).
-
Check File Existence in Terminal:
- If the file still doesn't appear, check the directory from the terminal to confirm it exists:
ls leetcode/daily
- If the file still doesn't appear, check the directory from the terminal to confirm it exists:
If the file exists but doesn't show up in VSCode, refreshing or restarting VSCode should solve the problem.
This repository uses a GitHub Actions workflow to automatically merge the daily-leetcode branch into the main branch on every push to daily-leetcode.
This helps keep the main branch always up to date with the latest solved problems without requiring manual pull requests.
- Workflow file:
auto-merge-daily.yml - Trigger: Push events on the
daily-leetcodebranch - Action:
- Checks out the repository
- Switches to the default branch (
main) - Merges changes from
daily-leetcode - Pushes the updated
mainbranch
This automation is especially useful for keeping the project organized and up to date while working on daily coding challenges.