Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cs-algorithms-0.0.2.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

cs_algorithms-0.0.2-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page