reduced file size for GIFs of sort_color
This commit is contained in:
27
README.md
27
README.md
@@ -91,7 +91,9 @@ In essence, each item “bubbles” up to the location where it belongs.
|
|||||||
|
|
||||||
| <a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/bubble_sort_scale.py" target="_blank">bubble_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/bubble_sort_color.py" target="_blank">bubble_sort_color.py</a>|
|
| <a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/bubble_sort_scale.py" target="_blank">bubble_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/bubble_sort_color.py" target="_blank">bubble_sort_color.py</a>|
|
||||||
| ------------- |-------------|
|
| ------------- |-------------|
|
||||||
|||
|
|||
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Insertion Sort
|
## Insertion Sort
|
||||||
|
|
||||||
@@ -107,11 +109,11 @@ then the values from the unsorted parts are picked and placed at the correct pos
|
|||||||
|
|
||||||
| <a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/insertion_sort_scale.py" target="_blank">insertion_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/insertion_sort_color.py" target="_blank">insertion_sort_color.py</a>|
|
| <a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/insertion_sort_scale.py" target="_blank">insertion_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/insertion_sort_color.py" target="_blank">insertion_sort_color.py</a>|
|
||||||
| ------------- |:-------------:|
|
| ------------- |:-------------:|
|
||||||
|||
|
|||
|
||||||
|
|
||||||
## Selection Sort
|
## Selection Sort
|
||||||
|
|
||||||
The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning.<br> The algorithm maintains two subarrays in a given array.
|
The algorithm maintains two subarrays in a given array.
|
||||||
<ul>
|
<ul>
|
||||||
<li>The subarray which is already sorted.</li>
|
<li>The subarray which is already sorted.</li>
|
||||||
<li>Remaining subarray which is unsorted.</li>
|
<li>Remaining subarray which is unsorted.</li>
|
||||||
@@ -120,7 +122,7 @@ The selection sort algorithm sorts an array by repeatedly finding the minimum el
|
|||||||
|
|
||||||
|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/selection_sort_scale.py" target="_blank">selection_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/selection_sort_color.py" target="_blank">selection_sort_color.py</a>|
|
|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/selection_sort_scale.py" target="_blank">selection_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/selection_sort_color.py" target="_blank">selection_sort_color.py</a>|
|
||||||
| ------------- |:-------------:|
|
| ------------- |:-------------:|
|
||||||
|||
|
|||
|
||||||
|
|
||||||
## Heap Sort
|
## Heap Sort
|
||||||
|
|
||||||
@@ -136,8 +138,8 @@ Heap sort basically recursively performs two main operations:
|
|||||||
|
|
||||||
|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/heap_sort_scale.py" target="_blank">heap_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/heap_sort_color.py" target="_blank">heap_sort_color.py</a>|
|
|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/heap_sort_scale.py" target="_blank">heap_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/heap_sort_color.py" target="_blank">heap_sort_color.py</a>|
|
||||||
| ------------- |:-------------:|
|
| ------------- |:-------------:|
|
||||||
|||
|
|||
|
||||||
|
|
||||||
## Shell Sort
|
## Shell Sort
|
||||||
<p>
|
<p>
|
||||||
The shell sort algorithm extends the insertion sort algorithm and is very efficient in sorting widely unsorted arrays.<br>
|
The shell sort algorithm extends the insertion sort algorithm and is very efficient in sorting widely unsorted arrays.<br>
|
||||||
@@ -154,13 +156,12 @@ This sorting technique works by sorting elements in pairs, far away from each ot
|
|||||||
|
|
||||||
|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/shell_sort_scale.py" target="_blank">shell_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/shell_sort_color.py" target="_blank">shell_sort_color.py</a>|
|
|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/shell_sort_scale.py" target="_blank">shell_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/shell_sort_color.py" target="_blank">shell_sort_color.py</a>|
|
||||||
| ------------- |:-------------:|
|
| ------------- |:-------------:|
|
||||||
|||
|
|||
|
||||||
|
|
||||||
## Merge Sort
|
## Merge Sort
|
||||||
|
|
||||||
Merge sort uses the divide and conquer approach to sort the elements. It is one of the most popular and efficient sorting algorithms.<br>
|
Merge sort uses the divide and conquer approach to sort the elements.<br>
|
||||||
It divides the given list into two equal halves, calls itself for the two halves and then merges the two sorted halves.<br>
|
It is one of the most popular and efficient sorting algorithms.<br>
|
||||||
We have to define the <strong>merge()</strong> function to perform the merging.
|
|
||||||
|
|
||||||
The sub-lists are divided again and again into halves until the list cannot be divided further.<br>
|
The sub-lists are divided again and again into halves until the list cannot be divided further.<br>
|
||||||
Then we combine the pair of one element lists into two-element lists, sorting them in the process.<br>
|
Then we combine the pair of one element lists into two-element lists, sorting them in the process.<br>
|
||||||
@@ -168,7 +169,7 @@ The sorted two-element pairs is merged into the four-element lists, and so on un
|
|||||||
|
|
||||||
| <a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/merge_sort_scale.py" target="_blank">merge_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/merge_sort_color.py" target="_blank">merge_sort_color.py</a>|
|
| <a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/merge_sort_scale.py" target="_blank">merge_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/merge_sort_color.py" target="_blank">merge_sort_color.py</a>|
|
||||||
| ------------- |:-------------:|
|
| ------------- |:-------------:|
|
||||||
|||
|
|||
|
||||||
|
|
||||||
## Quick Sort
|
## Quick Sort
|
||||||
|
|
||||||
@@ -186,8 +187,8 @@ All this should be done in linear time.
|
|||||||
|
|
||||||
| <a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/quick_sort_scale.py" target="_blank">quick_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/quick_sort_color.py" target="_blank">quick_sort_color.py</a>|
|
| <a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/quick_sort_scale.py" target="_blank">quick_sort_scale.py</a>|<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color/quick_sort_color.py" target="_blank">quick_sort_color.py</a>|
|
||||||
| ------------- |:-------------:|
|
| ------------- |:-------------:|
|
||||||
|||
|
|||
|
||||||
|
|
||||||
Big O
|
Big O
|
||||||
=====
|
=====
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user