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:
- Queue
- Stack
- BinaryTree
- BinarySearchTree
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.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ed0593f5a3c0b0c5ce5668f87f3697fbe497a31505968c13f6fb54820efe6d2 |
|
MD5 | a3a833af7c158266499bf5535db70cf7 |
|
BLAKE2b-256 | a32d0fe8055934b96e800dcd0f3fb899715c7a639220752bfec270efe13ed4e6 |