OmkarPathak / pygorithm

A Python module for learning all major algorithms
MIT License
4.41k stars 510 forks source link

added few sorting algorithms #95

Closed Pratiknarola closed 5 years ago

Pratiknarola commented 5 years ago

I have changed the cocktail_sort.py as suggested. And thanks for the advice. Eventually, these small tips help to write better code. If there is still any scope for improvement, please let me know.

Tjstretchalot commented 5 years ago

Thank you for the changes! Could you rename the functions to be snake_case? (i.e. timSort -> tim_sort)

Looking at the sorting unit tests they aren't the best right now, otherwise I would suggest adding those. However, I can refactor the sorting unit tests to be more comprehensive and less boilerplate first

Pratiknarola commented 5 years ago

@OmkarPathak Thanks for the advice. I have changed the function names as suggested. If there are any changes possible, please let me know.

Pratiknarola commented 5 years ago

@OmkarPathak Sorry for that. I forgot to do that and Sorry for so many mistakes. I have checked all files and I guess, now this should be okay but still if there is any changes, please let me know. Thanks.