Python
Python copied to clipboard
All Algorithms implemented in Python
### **Describe your change:** * [x] Add an algorithm? * [ ] Fix a bug or typo in an existing algorithm? * [ ] Documentation change? ### **Checklist:** * [x]...
### **Describe your change:** * [x] Add an algorithm? * [ ] Fix a bug or typo in an existing algorithm? * [x] Documentation change? ### **Checklist:** * [x] I...
**List is a built-in data structure in Python** * [x] Added a list, different operations on list, slicing, methods, list comprehension. ### **Checklist:** * [x] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md). *...
### **Describe your change:** Adding Iterative QuickSort algorithm, hope u like it! * [X] Add an algorithm? * [ ] Fix a bug or typo in an existing algorithm? *...
### **Describe your change:** Added code lines for getting accuracy of KNN algorithm. Added one more array sample for testing. Small changes in variable names for improving readability. ### **Checklist:**...
According to [this question](https://stackoverflow.com/questions/164163/quicksort-choosing-the-pivot) on StackOverflow it is better to use the median or a random value as a pivot. Currently the implementation uses the last element as the pivot....
I suggest to add ascending and descending mode in sort algorithm.
I've written an algorithm which when given input, will return you a pythagorean triplet including that number. It works for EVERY number (provided n > 2). Do let me know...
### **Describe your change:** Changed the code to avoid overflow * [ ] Add an algorithm? * [x] Fix a bug or typo in an existing algorithm? * [ ]...
### **Describe your change:** Addition of new algorithm in new file "maths/poisson_distribution.py" The poisson_distribution.py file consists of an algorithm that can compute and calculate probability using Poisson distribution. https://en.wikipedia.org/wiki/Poisson_distribution *...