Update README.md
This commit is contained in:
parent
36e11ef66c
commit
1c8ffc7a4f
49
README.md
49
README.md
@ -24,12 +24,12 @@ Table of contents
|
||||
Description
|
||||
===========
|
||||
Running one of the scripts in this project generates primitive meshes in Blender, wich are animated to visualize various sorting algorithms.<br>
|
||||
The three folders (sort_color, sort_combined, sort_scale) contain three different types of visualisation.
|
||||
The three folders <strong>(sort_color, sort_combined, sort_scale)</strong> contain three different types of visualisation.
|
||||
|
||||
<ul>
|
||||
<li>2D array of planes arragned into a square sorted based on color</li>
|
||||
<li>multiple 2D arrays of planes arragned into a cube sorted based on color</li>
|
||||
<li>array of cuboids sorted based on height + array access and comparison counter</li>
|
||||
<li><a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_color" target="_blank"><strong>sort_color: </strong></a>2D array of planes arragned into a square sorted based on color </li>
|
||||
<li><a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_combined" target="_blank"><strong>sort_combined: </strong></a>multiple 2D arrays of planes arragned into a cube sorted based on color</li>
|
||||
<li><a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale" target="_blank"><strong>sort_scale: </strong></a>array of cuboids sorted based on height + array access and comparison counter</li>
|
||||
</ul>
|
||||
|
||||
[comment]: <> (Why you used the technologies you usedSome of the challenges you faced and features you hope to implement in the future4. How to Install and Run the ProjectIf you are working on a project that a user needs to install or run locally in a machine like a "POS", you should include the steps required to install your project and also the required dependencies if any.Provide a step-by-step description of how to get the development environment set and running.)
|
||||
@ -43,10 +43,9 @@ Bubble sort is one of the most straightforward sorting algorithms.<br>
|
||||
Its name comes from the way the algorithm works: With every new pass, the largest element in the list “bubbles up” toward its correct position.
|
||||
|
||||
Bubble sort consists of making multiple passes through a list, comparing elements one by one, and swapping adjacent items that are out of order.
|
||||
|
||||

|
||||
|
||||
<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/bubble_sort_scale.py" target="_blank">Script</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
|
||||
|
||||
@ -54,9 +53,9 @@ Like bubble sort, the insertion sort algorithm is straightforward to implement a
|
||||
But unlike bubble sort, it builds the sorted list one element at a time by comparing each item with the rest of the list and inserting it into its correct position.
|
||||
This “insertion” procedure gives the algorithm its name.
|
||||
|
||||

|
||||
|
||||
<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/insertion_sort_scale.py" target="_blank">Script</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
|
||||
|
||||
@ -67,9 +66,9 @@ The selection sort algorithm sorts an array by repeatedly finding the minimum el
|
||||
</ul>
|
||||
In every iteration of selection sort, the minimum element (considering ascending order) from the unsorted subarray is picked and moved to the sorted subarray.
|
||||
|
||||

|
||||
|
||||
<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/selection_sort_scale.py" target="_blank">Script</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>|
|
||||
| ------------- |:-------------:|
|
||||
|||
|
||||
|
||||
## Shell Sort
|
||||
|
||||
@ -82,10 +81,9 @@ The array is divided into sub-arrays and then insertion sort is applied. The alg
|
||||
<li>Repeat this process until the complete list is sorted.</li>
|
||||
</ul>
|
||||
|
||||

|
||||
|
||||
|
||||
<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/shell_sort_scale.py" target="_blank">Script</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
|
||||
|
||||
@ -97,14 +95,15 @@ The sub-lists are divided again and again into halves until the list cannot be d
|
||||
Then we combine the pair of one element lists into two-element lists, sorting them in the process.<br>
|
||||
The sorted two-element pairs is merged into the four-element lists, and so on until we get the sorted list.
|
||||
|
||||

|
||||
|
||||
<a href="https://github.com/ForeignGods/Sorting-Algorithms-Blender/blob/main/sort_scale/merge_sort_scale.py" target="_blank">Script</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
|
||||
|
||||
Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot. There are many different versions of quickSort that pick pivot in different ways.
|
||||
<ul>
|
||||
|
||||
<li>Always pick first element as pivot.</li>
|
||||
<li>Always pick last element as pivot.</li>
|
||||
<li>Pick a random element as pivot.</li>
|
||||
@ -114,9 +113,9 @@ Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an elemen
|
||||
The key process in quickSort is partition(). Target of partitions is, given an array and an element x of array as pivot, put x at its correct position in sorted array and put all smaller elements (smaller than x) before x, and put all greater elements (greater than x) after x.<br>
|
||||
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">Script</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
|
||||
=====
|
||||
@ -153,7 +152,7 @@ These are the asymptotic notations that are used for calculating the time comple
|
||||
<ul>
|
||||
<li>Big O Notation, O:</li>
|
||||
|
||||
It measures the upper limit of an algorithm's running time or the worst-case time complexity. It is known by O(n)O(n)O(n) for input size 'n'.
|
||||
It measures the upper limit of an algorithm's running time or the worst-case time complexity. It is known by O(n) for input size 'n'.
|
||||
|
||||
<li>Omega Notation, Ω:</li>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user