Skip to content

Commit f1699d9

Browse files
committed
Update documentation and problem statements for clarity and consistency; add placeholder files for future implementations.
1 parent 777b257 commit f1699d9

File tree

14 files changed

+223
-76
lines changed

14 files changed

+223
-76
lines changed

.github/scripts/update_documentation.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,12 @@ def create_table_rows():
213213

214214
return "\n".join(rows)
215215

216-
replacement = r"\1" + create_table_rows() + r"\3"
217-
return re.sub(table_pattern, replacement, content, flags=re.DOTALL)
216+
table_rows = create_table_rows()
217+
218+
def replacement_func(match):
219+
return match.group(1) + table_rows + match.group(3)
220+
221+
return re.sub(table_pattern, replacement_func, content, flags=re.DOTALL)
218222

219223
def _update_readme_statistics(self, content: str) -> str:
220224
"""Update repository statistics"""

.github/scripts/validate_documentation.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,17 @@ def validate_readme(self) -> None:
2828
return
2929

3030
content = readme_path.read_text(encoding='utf-8')
31-
32-
# Check for required sections
31+
# Check for required sections
3332
required_sections = [
34-
"# LeetCode Problem Solutions",
35-
"## Repository Structure",
36-
"## Daily Problems",
37-
"## Language Support"
33+
"LeetCode Problem Solutions",
34+
"Repository Structure",
35+
"Daily Problems",
36+
"Language"
3837
]
3938

4039
for section in required_sections:
4140
if section not in content:
42-
self.warnings.append(f"README.md missing section: {section}")
41+
self.warnings.append(f"README.md missing section containing: {section}")
4342

4443
logger.info("README.md validation completed")
4544

@@ -51,17 +50,16 @@ def validate_index(self) -> None:
5150
return
5251

5352
content = index_path.read_text(encoding='utf-8')
54-
55-
# Check for required sections
53+
# Check for required sections
5654
required_sections = [
57-
"# Problem Index",
58-
"## By Difficulty",
59-
"## By Topic"
55+
"Problem Index",
56+
"By Difficulty",
57+
"By Topic"
6058
]
6159

6260
for section in required_sections:
6361
if section not in content:
64-
self.warnings.append(f"INDEX.md missing section: {section}")
62+
self.warnings.append(f"INDEX.md missing section containing: {section}")
6563

6664
logger.info("INDEX.md validation completed")
6765

Daily_Problems/DailyProblem1/Problem.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# 1190. Reverse Substrings Between Each Pair of Parentheses
22

3+
**Difficulty**: Medium
4+
35
## Solved
4-
`Medium`
56

67
### Topics
78
`Companies`

Daily_Problems/DailyProblem2/Problem.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# 1717. Maximum Score From Removing Substrings
22

3-
`Solved`
4-
`Medium`
3+
**Difficulty**: Medium
4+
5+
`Solved`
56

67
## Topics
78
- Strings

Daily_Problems/DailyProblem3/Problem.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# 2751. Robot Collisions
22

3+
**Difficulty**: Hard
4+
35
- `Solved`
4-
- `Hard`
56
- `Topics`
67
- `Companies`
78

Daily_Problems/DailyProblem5/Problem.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# 2894. Divisible and Non-divisible Sums Difference
22

3-
**Difficulty:** Easy
4-
**Topics:** Math, Array
5-
**Companies:** Premium Lock
3+
**Difficulty**: Easy
4+
**Topics**: Math, Array
5+
**Companies**: Premium Lock
66

77
## Problem Statement
88

Daily_Problems/DailyProblem6/Problem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 1298. Maximum Candies You Can Get from Boxes
22

3-
**Difficulty:** Hard
4-
**Topics:** Array, BFS, DFS
3+
**Difficulty**: Hard
4+
**Topics**: Array, BFS, DFS
55

66
## Problem Description
77

INDEX.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This document serves as a comprehensive index and navigation guide for the LeetC
1919
#### Easy Problems
2020
| Problem # | Title | Topics | Folder | Status |
2121
|-----------|-------|--------|--------|--------|
22-
| 2894 | [Divisible and Non-divisible Sums Difference](LEETCODE/Daily_Problems/DailyProblem5/) | Math, Array | DailyProblem5 | ✅ Complete |
22+
| 2894 | [Divisible and Non-divisible Sums Difference](Daily_Problems/DailyProblem5/) | Math, Array | DailyProblem5 | ✅ Complete |
2323

2424
#### Medium Problems
2525
| Problem # | Title | Topics | Folder | Status |
@@ -29,9 +29,9 @@ This document serves as a comprehensive index and navigation guide for the LeetC
2929
#### Hard Problems
3030
| Problem # | Title | Topics | Folder | Status |
3131
|-----------|-------|--------|--------|--------|
32-
| 1639 | [Number of Ways to Form a Target String](LEETCODE/Rgegular_Practice_Problems/Problem1/) | Dynamic Programming, String | Problem1 | ✅ Complete |
33-
| 1298 | [Maximum Candies You Can Get from Boxes](LEETCODE/Daily_Problems/DailyProblem6/) | BFS, DFS, Graph | DailyProblem6 | ✅ Complete |
34-
| 1298 | [Maximum Candies You Can Get from Boxes](LEETCODE/Daily_Problems/DailyProblem6/) | BFS, DFS, Graph | DailyProblem6 | ✅ Complete |
32+
| 1639 | [Number of Ways to Form a Target String](Rgegular_Practice_Problems/Problem1/) | Dynamic Programming, String | Problem1 | ✅ Complete |
33+
| 1298 | [Maximum Candies You Can Get from Boxes](Daily_Problems/DailyProblem6/) | BFS, DFS, Graph | DailyProblem6 | ✅ Complete |
34+
| 1298 | [Maximum Candies You Can Get from Boxes](Daily_Problems/DailyProblem6/) | BFS, DFS, Graph | DailyProblem6 | ✅ Complete |
3535

3636
### By Topic Category
3737

@@ -58,7 +58,7 @@ This document serves as a comprehensive index and navigation guide for the LeetC
5858
### By Problem Source
5959

6060
#### Daily Challenge Problems
61-
Located in `LEETCODE/Daily_Problems/`
61+
Located in `Daily_Problems/`
6262

6363
| Folder | Problem # | Title | Date Added | Completion |
6464
|--------|-----------|-------|------------|------------|
@@ -71,7 +71,7 @@ Located in `LEETCODE/Daily_Problems/`
7171
| DailyProblem6 | 1298 | Maximum Candies You Can Get from Boxes | June 2025 | ✅ Complete |
7272

7373
#### Practice Problems
74-
Located in `LEETCODE/Rgegular_Practice_Problems/`
74+
Located in `Rgegular_Practice_Problems/`
7575

7676
| Folder | Problem # | Title | Focus Area | Completion |
7777
|--------|-----------|-------|------------|------------|
@@ -89,15 +89,15 @@ Located in `LEETCODE/Rgegular_Practice_Problems/`
8989
- **Planned**: Substring problems, array optimization
9090

9191
### Dynamic Programming
92-
-**[Problem 1639](LEETCODE/Rgegular_Practice_Problems/Problem1/)**: 2D DP with space optimization
92+
-**[Problem 1639](Rgegular_Practice_Problems/Problem1/)**: 2D DP with space optimization
9393
- **Patterns covered**: 2D DP, space optimization, memoization
9494

9595
### Hash Table/Map
9696
- **Used in**: Problem 1639 (character frequency counting)
9797
- **Patterns**: Frequency counting, lookup optimization
9898

9999
### Mathematical Optimization
100-
-**[Problem 2894](LEETCODE/Daily_Problems/DailyProblem5/)**: O(n) to O(1) optimization
100+
-**[Problem 2894](Daily_Problems/DailyProblem5/)**: O(n) to O(1) optimization
101101
- **Patterns covered**: Arithmetic series, modular arithmetic
102102

103103
### Graph Algorithms
@@ -155,13 +155,13 @@ Located in `LEETCODE/Rgegular_Practice_Problems/`
155155
## 🎯 Learning Pathways
156156

157157
### For Beginners
158-
1. **Start with**: [Problem 2894](LEETCODE/Daily_Problems/DailyProblem5/) (Easy Math)
158+
1. **Start with**: [Problem 2894](Daily_Problems/DailyProblem5/) (Easy Math)
159159
2. **Learn**: Basic algorithm analysis, O(1) optimization
160160
3. **Languages**: Begin with Python or JavaScript
161161
4. **Focus**: Understanding problem-solving approach
162162

163163
### For Intermediate Developers
164-
1. **Start with**: [Problem 1639](LEETCODE/Rgegular_Practice_Problems/Problem1/) (Dynamic Programming)
164+
1. **Start with**: [Problem 1639](Rgegular_Practice_Problems/Problem1/) (Dynamic Programming)
165165
2. **Learn**: Space optimization, multiple approaches
166166
3. **Languages**: Try C++ or Java for performance insights
167167
4. **Focus**: Algorithm optimization and complexity analysis
@@ -200,7 +200,7 @@ Repository Root/
200200
├── 📄 LANGUAGE_GUIDE.md # Language-specific guides
201201
├── 📄 PERFORMANCE_ANALYSIS.md # Cross-language analysis
202202
├── 📄 INDEX.md # This navigation file
203-
└── 📁 LEETCODE/
203+
└── 📁 LeetCodeProblemSolutions/
204204
├── 📁 Daily_Problems/ # LeetCode daily challenges
205205
│ ├── 📁 DailyProblem1/ # Placeholder
206206
│ ├── 📁 DailyProblem2/ # Placeholder

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 LeetCode Problem Solutions
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

PERFORMANCE_ANALYSIS.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,3 +604,55 @@ The "best" language depends on your specific use case, team, and requirements. T
604604

605605
*Last Updated: May 27, 2025*
606606
*Benchmark Environment: Intel i7-10700K, 32GB RAM, Ubuntu 22.04*
607+
608+
### Problem 1190: Reverse Substrings Between Each Pair of Parentheses
609+
610+
| Language | Time Complexity | Space Complexity | Runtime | Memory |
611+
|----------|----------------|------------------|---------|--------|
612+
| C++ | O(n) | O(1) | TBD ms | TBD MB |
613+
| Java | O(n) | O(1) | TBD ms | TBD MB |
614+
| Python | O(n) | O(1) | TBD ms | TBD MB |
615+
| JavaScript | O(n) | O(1) | TBD ms | TBD MB |
616+
| Rust | O(n) | O(1) | TBD ms | TBD MB |
617+
618+
**Analysis**: Performance analysis pending - please run benchmarks and update.
619+
620+
621+
### Problem 1717: Maximum Score From Removing Substrings
622+
623+
| Language | Time Complexity | Space Complexity | Runtime | Memory |
624+
|----------|----------------|------------------|---------|--------|
625+
| C++ | O(n) | O(1) | TBD ms | TBD MB |
626+
| Java | O(n) | O(1) | TBD ms | TBD MB |
627+
| Python | O(n) | O(1) | TBD ms | TBD MB |
628+
| JavaScript | O(n) | O(1) | TBD ms | TBD MB |
629+
| Rust | O(n) | O(1) | TBD ms | TBD MB |
630+
631+
**Analysis**: Performance analysis pending - please run benchmarks and update.
632+
633+
634+
### Problem 2751: Robot Collisions
635+
636+
| Language | Time Complexity | Space Complexity | Runtime | Memory |
637+
|----------|----------------|------------------|---------|--------|
638+
| C++ | O(n) | O(1) | TBD ms | TBD MB |
639+
| Java | O(n) | O(1) | TBD ms | TBD MB |
640+
| Python | O(n) | O(1) | TBD ms | TBD MB |
641+
| JavaScript | O(n) | O(1) | TBD ms | TBD MB |
642+
| Rust | O(n) | O(1) | TBD ms | TBD MB |
643+
644+
**Analysis**: Performance analysis pending - please run benchmarks and update.
645+
646+
647+
### Problem 726: Number of Atoms
648+
649+
| Language | Time Complexity | Space Complexity | Runtime | Memory |
650+
|----------|----------------|------------------|---------|--------|
651+
| C++ | O(n) | O(1) | TBD ms | TBD MB |
652+
| Java | O(n) | O(1) | TBD ms | TBD MB |
653+
| Python | O(n) | O(1) | TBD ms | TBD MB |
654+
| JavaScript | O(n) | O(1) | TBD ms | TBD MB |
655+
| Rust | O(n) | O(1) | TBD ms | TBD MB |
656+
657+
**Analysis**: Performance analysis pending - please run benchmarks and update.
658+

0 commit comments

Comments
 (0)