mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 15:01:08 +00:00
Compare commits
7 Commits
9d17ceeca5
...
f107675716
Author | SHA1 | Date | |
---|---|---|---|
|
f107675716 | ||
|
f3f32ae3ca | ||
|
e3bd7721c8 | ||
|
e3f3d668be | ||
|
3e9ca92ca9 | ||
|
e6bf296b99 | ||
|
2551e725b3 |
|
@ -16,7 +16,7 @@ repos:
|
|||
- id: auto-walrus
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.7.1
|
||||
rev: v0.7.4
|
||||
hooks:
|
||||
- id: ruff
|
||||
- id: ruff-format
|
||||
|
@ -29,7 +29,7 @@ repos:
|
|||
- tomli
|
||||
|
||||
- repo: https://github.com/tox-dev/pyproject-fmt
|
||||
rev: "v2.4.3"
|
||||
rev: "v2.5.0"
|
||||
hooks:
|
||||
- id: pyproject-fmt
|
||||
|
||||
|
@ -42,7 +42,7 @@ repos:
|
|||
pass_filenames: false
|
||||
|
||||
- repo: https://github.com/abravalheri/validate-pyproject
|
||||
rev: v0.22
|
||||
rev: v0.23
|
||||
hooks:
|
||||
- id: validate-pyproject
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ def solved(values):
|
|||
|
||||
def from_file(filename, sep="\n"):
|
||||
"Parse a file into a list of strings, separated by sep."
|
||||
return open(filename).read().strip().split(sep) # noqa: SIM115
|
||||
return open(filename).read().strip().split(sep)
|
||||
|
||||
|
||||
def random_puzzle(assignments=17):
|
||||
|
|
11
graphs/Recommendations for future graphs.
Normal file
11
graphs/Recommendations for future graphs.
Normal file
|
@ -0,0 +1,11 @@
|
|||
#For the future, here are some unique enhancement ideas to expand the algorithms repository.
|
||||
|
||||
#Graph Visualization: Integrate tools for visualizing graph algorithms, such as Kahn's algorithm for topological sorting. This would aid users in understanding algorithm behavior in real time. Visuals could include node and edge color changes as the algorithm processes different vertices and edges.
|
||||
|
||||
#Algorithm Complexity Documentation: A comprehensive guide on time and space complexity for each algorithm would be beneficial, especially for educational purposes. This would include complexity analysis for various cases (best, average, and worst).
|
||||
|
||||
#Adjacency Matrix and List Comparisons: Expand upon graph representations by providing insights into when to use adjacency matrices versus adjacency lists. This could be an educational addition that compares trade-offs in terms of space and time complexity based on graph density and sparsity.
|
||||
|
||||
#Edge Cases and Testing: Enhance the testing framework by incorporating edge-case scenarios for algorithms that handle various data structures and data types. For instance, tests could address edge cases in sorting algorithms (like nearly sorted lists or lists with duplicates) and graph algorithms (like disconnected components in Kahn’s algorithm).
|
||||
|
||||
#Real-world Applications: Add examples that link algorithms to real-world applications, such as network flow problems or graph-based recommendation systems, to showcase how specific algorithms apply to real scenarios.
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
#!python
|
||||
import os
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user