Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,27 @@ stats:
# Update README badges with current problem counts
.PHONY: update-badges
update-badges:
@echo "$(call color_green,Updating README badges...)"
@echo "Updating README badges..."
@./scripts/update_badges.sh
@echo "$(call color_green,README badges updated.)"

# README Generation
.PHONY: readme
readme: ## Generate README from problem configurations
@$(PYTHON) scripts/generate_readme.py

.PHONY: readme-check
readme-check: ## Check if README is up to date
@echo "Checking if README is up to date..."
@cp README.md README.md.backup
@$(PYTHON) scripts/generate_readme.py > /dev/null
@if ! diff -q README.md README.md.backup > /dev/null; then \
echo "$(call color_yellow,README is out of date. Run 'make readme' to update.)"; \
mv README.md.backup README.md; \
else \
echo "$(call color_green,README is up to date.)"; \
rm README.md.backup; \
fi

# Debug Google Test configuration
.PHONY: debug-gtest
Expand Down Expand Up @@ -334,6 +353,8 @@ help:
@echo "$(call color_yellow,Utility Targets:)"
@echo " clean - Clean build artifacts"
@echo " stats - Show project statistics"
@echo " readme - Generate README from problem configurations"
@echo " readme-check - Check if README is up to date"
@echo " update-badges - Update README badges with current problem counts"
@echo " debug-gtest - Debug Google Test configuration"
@echo " help - Show this help message"
Expand Down
97 changes: 15 additions & 82 deletions README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions config/difficulties.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
difficulties:
- easy
- medium
- hard
17 changes: 17 additions & 0 deletions config/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
tags:
- "Arrays & Hashing"
- "Two Pointers"
- "Sliding Window"
- "Stack"
- "Matrix"
- "Intervals"
- "Linked List"
- "Binary Tree General"
- "Binary Tree BFS"
- "Binary Search Tree"
- "Graph General"
- "Dynamic Programming"
- "Backtracking"
- "Heap"
- "Greedy"
- "Trie"
17 changes: 17 additions & 0 deletions problems/two_sum/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
problem:
number: 1
title: "Two Sum"
leetcode_url: "https://leetcode.com/problems/two-sum/"
difficulty: "easy"
tags: ["Arrays & Hashing"]

solutions:
python: "problems/two_sum/two_sum.py"
cpp: "problems/two_sum/two_sum.cc"

complexity:
time: "O(n)"
space: "O(n)"

notes: ""
readme_link: ""
17 changes: 17 additions & 0 deletions problems/valid_palindrome/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
problem:
number: 125
title: "Valid Palindrome"
leetcode_url: "https://leetcode.com/problems/valid-palindrome/"
difficulty: "easy"
tags: ["Two Pointers"]

solutions:
python: "problems/valid_palindrome/valid_palindrome.py"
cpp: "problems/valid_palindrome/valid_palindrome.cc"

complexity:
time: "O(n)"
space: "O(1)"

notes: ""
readme_link: ""
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ ruff
# Testing tools
pytest
pytest-cov

# YAML processing library
PyYAML
Loading