Skip to content

noorac/py-sorting-algorithms

Repository files navigation

Sorting Algorithms Collection

Welcome to the Sorting Algorithms Collection, a repository showcasing various sorting techniques implemented in Python. This project is part of my portfolio and demonstrates my understanding of algorithms and clean, efficient code.


Features

  • Comprehensive Collection: Includes popular sorting algorithms like Quick Sort, Merge Sort, Bubble Sort, and more.
  • Code Modularity: Algorithms are available both as individual scripts and in the future in a single consolidated file for convenience.
  • Educational Focus: Detailed comments and explanations are included in the code to promote understanding.
  • Scalable Design: Repository structure supports future additions of other algorithm types.

Algorithms Included

Algorithm Time Complexity (Best) Time Complexity (Worst) Space Complexity
Bubble Sort O(n) O(n²) O(1)
Quick Sort O(n log n) O(n²) O(log n)
Merge Sort O(n log n) O(n log n) O(n)
Selection Sort O(n²) O(n²) O(1)
Insertion Sort O(n) O(n²) O(1)
Heap Sort O(n log n) O(n log n) O(1)
Shell Sort O(n log n) O(n²) O(1)
Bucket Sort O(n + k) O(n²) O(n + k)

How to Use

Clone the Repository

git clone https://github.com/yourusername/sorting-algorithms.git

cd into the new directory

cd py-sorting-algorithms

The integer after the name of the file will determine the length of the test-list used. If no argument is given, it defaults to 15000

python bubblesort.py 15000

Contributing

Contributions are welcome! If you have suggestions or improvements, please feel free to open an issue or submit a pull request. See CONTRIBUTING.md for details

License

This is licensed under GNU General Public License v3. See LICENSE for details.

Contact

If you have questions about the project or want to collaborate, feel free to contact me:

About

A collection of python scripts using different sorting algorithms

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages