Skip to content

added links for sections - #13239

Closed
julian-st wants to merge 3 commits into
TheAlgorithms:masterfrom
julian-st:patch-2
Closed

added links for sections#13239
julian-st wants to merge 3 commits into
TheAlgorithms:masterfrom
julian-st:patch-2

Conversation

@julian-st

Copy link
Copy Markdown

Describe your change:

Added links for sections in the directory.md to improve readability

#13111

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

@algorithms-keeper algorithms-keeper Bot added the awaiting reviews This PR is ready to be reviewed label Oct 5, 2025
@cclauss

cclauss commented Sep 5, 2026

Copy link
Copy Markdown
Member

This is a cool idea, but it would need to be built into the file scripts/build_directory_md.py which builds DIRECTORY.md

@priya-sundaram-dev

@priya-sundaram-dev

Copy link
Copy Markdown
Contributor

Good call, @cclauss — wired it into the generator instead so it stays in sync: #15198 adds a linked ## Table of Contents of the top-level sections to the top of DIRECTORY.md, built by scripts/build_directory_md.py (new md_anchor() helper + doctests). @julian-st, credited your idea in the PR. 🙂

cclauss pushed a commit that referenced this pull request Sep 6, 2026
* Add a table of contents to DIRECTORY.md

Generate a linked table of contents of the top-level sections at the top
of DIRECTORY.md so readers can jump straight to a category, as suggested
in #13239 / #13111. The list is built in scripts/build_directory_md.py
(with a new md_anchor helper + doctests) so DIRECTORY.md stays fully
auto-generated.

* Address review: numbered ToC + link section headings to their directories

- Table of Contents is now a numbered list, so the final number shows the
  total count of algorithm folders at a glance.
- Each top-level section heading links to its algorithm directory (e.g.
  ## [Sorts](sorts)), so clicking a section title jumps straight to the folder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviews This PR is ready to be reviewed git merge conflict

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants