Description in README, improve long-row warning to be more accurate

This commit is contained in:
2023-10-08 19:51:50 -05:00
parent 8c37c7cf44
commit 4b84ecaf4a
3 changed files with 12 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
# leetcode # leetcode
This repository contains my solutions to various problems on [LeetCode](https://leetcode.com/).
Below is the full table containing all the problems I have solved so far. The table is [automatically generated](./.generate/main.py).
{{ table }} {{ table }}
<sub> <sub>

View File

@@ -82,9 +82,11 @@ def main():
for solution in meta["solutions"] for solution in meta["solutions"]
) )
if len(solutions) > 15: # The length of the solution name + 2 characters to join the solutions together (minus the last one)
space_used: int = sum(len(solution["name"] ) for solution in meta["solutions"]) + (len(meta["solutions"]) - 1) * 2
if space_used > 30:
logger.warning( logger.warning(
f"Solution '{question.title}' has a long list of solutions ({len(solutions)})." f"Solution '{question.title}' has a long list of solutions ({space_used})."
) )
columns = [ columns = [

View File

@@ -1,5 +1,9 @@
# leetcode # leetcode
This repository contains my solutions to various problems on [LeetCode](https://leetcode.com/).
Below is the full table containing all the problems I have solved so far. The table is [automatically generated](./.generate/main.py).
| # | Title | Solution | Difficulty | | # | Title | Solution | Difficulty |
|-|-|-|-| |-|-|-|-|
| [8](https://leetcode.com/problems/string-to-integer-atoi) | [String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi) | [Java](/solutions/string-to-integer-atoi/Solution.java) | Medium | | [8](https://leetcode.com/problems/string-to-integer-atoi) | [String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi) | [Java](/solutions/string-to-integer-atoi/Solution.java) | Medium |