Sorting Algorithms & Data Structures
Project description
cs-algorithms
Python package with common sorting algorithms and data structures
Current functionality
-
Sroting:
-
is_sorted
Check if a given array is sorted (works for ascending and descending order).
-
bubble_sort_original
Repeatedly swapping the adjacent elements if they are in wrong order.
-
bubble_sort_optimized
Repeatedly swapping the adjacent elements if they are in wrong order (stops when array is sorted).
-
selection_sort
Repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning.
-
insertion_sort
The array is virtually split into a sorted and an unsorted part. Values from the unsorted part are picked and placed at the correct position in the sorted part.
-
merge_sort
It divides the input array into two halves, calls itself for the two halves, and then merges the two sorted halves.
-
quick_sort
It picks an element as pivot and partitions the given array around the picked pivot.
-
-
Data Structures:
- None
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cs_algorithms-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb580bd9d723f16a8f6b3f4c48e3abc828a75cdb89d6b84031cefa4238907b94 |
|
MD5 | 9279dba56af853e631ce69666f5de61e |
|
BLAKE2b-256 | df9fa144689a1aabc1131c0061beca40bafb8a1e8909ccfaccdbca3a96451bb9 |