-
-
Notifications
You must be signed in to change notification settings - Fork 45.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes wiki and doctest issues #11227
base: master
Are you sure you want to change the base?
Conversation
I havent taken the time to fully understand the code in the |
@@ -0,0 +1,6 @@ | |||
## Python Algorithms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I suppose that is true. In fixing the wiki issue, the doctests issue was highlighted. Both are addressed here
<br/> | ||
|
||
<ol> | ||
<li><a href="">Selection Sort</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit uncomfortable with an unsorted list of sorting algorithms. Are these sorted alphabetically, sorted for speed, or other? DIRECTORY.md is machine-generated to keep algorithms up-to-date and sorted alphabetically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a like for like drop-in except for the corrected markdown. The existing pages algorithms were already sorted like this. Ultimately, I was just trying to fix the issue highlighted in #11227 which also has the unsorted list. The wiki can be edited in the GUI by a repo admin in <30seconds
<li><a href="">Binary Insertion Sort</a></li> | ||
<li><a href="">BogoSort or Permutation Sort</a></li> | ||
<li><a href="">Gnome Sort</a></li> | ||
<li><a href="">Sleep Sort – The King of Laziness / Sorting while Sleeping</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I HATE this algorithm because it wastes time and compute power.
Fixed calculate_age function such that is returns the age correctly from a given timestamp. Fixed doctests to be robust when year changes
for more information, see https://pre-commit.ci
removed unused import
@cclauss Ive updated the whole |
The |
I am lost trying to figure out how this works. If I go to https://github.com/TheAlgorithms/Python/wiki I already get most of this. Could you let me know why what we have already is not enough? When I click on List of Algorithms and scroll down to It is more customary and easier to find if the information about best case, worst case, is documented in |
This PR is literally only to fix the typos that I found in the markdown of the wiki as mentioned in 11225. You only need to correct those typos now as you have fixed the other changes that I spent time correcting in |
To put it most simply, please visit https://github.com/TheAlgorithms/Python/wiki/Sorting-Algorithms#selection-sort. It is misformatted and links to the wrong algorithm (bubble sort rather than selection sort). You can lift the relevant markdown from this PR directly into the wiki to resolve this issue. Github has no way of easily opening PRs against wiki pages |
Describe your change:
Fixes a markdown typo in the wiki (unable to edit the wiki directly in a PR so I think @Siddharth1605 added the files as new to be ported). In doing so, the ci doctests pipeline failed for
calculate_age
inweb_programming/get_top_billionaires.py
which I refactored and addressed[closes #11225]
Checklist: