TheAlgorithms / Python

All Algorithms implemented in Python
https://thealgorithms.github.io/Python/
MIT License
194.88k stars 45.84k forks source link

Misformatted/linked wiki entry in python sorting #11225

Open MarlieChiller opened 11 months ago

MarlieChiller commented 11 months ago

What would you like to share?

This file should be edited (I tried, but I dont think you can edit wikis on forks)


current

image

proposed

image

and requires modifying the markdown to this:

<h2>Selection sort</h2>

**selection sort**, algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from the unsorted part and putting it at the beginning. The algorithm maintains two subarrays in a given array.
<ol>
<li> The subarray which is already sorted.</li>
<li> Remaining subarray which is unsorted.</li>

In every iteration of selection sort, the minimum element (considering ascending order) from the unsorted subarray is picked and moved to the sorted subarray.

#### Properties:
- Worst-case performance O(n^2)
- Best-case performance O(n)
- Average case performance O(n^2)

**read more at: [Wikipedia](https://en.wikipedia.org/wiki/Selection_sort)**<br>
**code: [Selection sort](https://github.com/TheAlgorithms/Python/blob/master/sorts/selection_sort.py)**

***

Note: edit required to bold text and link to code. example ref

Additional information

No response

27371123 commented 1 day ago

11:41:59 Here are some common issues related to misformatted or linked wiki entries in the context of Python sorting and how to address them:

Misformatted Entries

Incorrect Syntax Highlighting

Incomplete or Unclear Explanations