About this repository
This repository is meant to be a growing collection of interesting and useful algorithms implemented in Python and presented in IPython notebooks. IPython notebooks, because they offer a convenient way for describing the algorithm, benchmarking, maybe even visualization, and eventually sharing and viewing.
I am looking forward to your contributions, suggestions, and ideas
If you have any suggestions or want to make additions, I would be very happy if you could send me
- an email,
- leave me a message on google+,
- or even send me a tweet on twitter (given you can fit it within the 140 character limit ;)).
- Or even better: It would be great if you would simply fork this project and send me a pull request.
Categories
Algorithm Essentials
Greedy Algorithms
- Introduction to Greedy Algorithms [ GitHub ] [ Jupyter nbviewer ]
- More Greedy Algorithm Examples [ GitHub ] [ Jupyter nbviewer ]
- Breadth-First Search [cross-linked] [ GitHub ] [ Jupyter nbviewer ]
- Dijkstra's Algorithm [cross-linked] [ GitHub ] [ Jupyter nbviewer ]
Divide-and-Conquer Algorithms
- Introduction to Divide-and-Conquer Algorithms[ GitHub ] [ Jupyter nbviewer ]
- Binary Search [cross-linked] [ GitHub ] [ Jupyter nbviewer ]
- Recursion Examples [ GitHub ] [ Jupyter nbviewer ]
Other
- FizzBuzz [ GitHub ] [ Jupyter nbviewer ]
Sorting Algorithms
- Selection Sort [ GitHub ] [ Jupyter nbviewer ]
- Bubble Sort [ GitHub ] [ Jupyter nbviewer ]
- QuickSort [ GitHub ] [ Jupyter nbviewer ]
Data Structures
- Implementing a Simple Hash Table [ GitHub ] [ Jupyter nbviewer ]
- Bloom Filters [ GitHub ] [ Jupyter nbviewer ]
- Singly Linked List [ GitHub ] [ Jupyter nbviewer ]
- Stacks [ GitHub ] [ Jupyter nbviewer ]
- Queues and Deques [ GitHub ] [ Jupyter nbviewer ]
Search Algorithms
- Binary Search [ GitHub ] [ Jupyter nbviewer ]
- Breadth-First Search [ GitHub ] [ Jupyter nbviewer ]
- Dijkstra's Algorithm [ GitHub ] [ Jupyter nbviewer ]
Statistical Analysis
- Linear regression via the least squares fit method [ GitHub ] [ Jupyter nbviewer ]
- Dixon's Q test to identify outliers for small sample sizes [ GitHub ] [ Jupyter nbviewer ]
- Rejection sampling [ GitHub ] [ Jupyter nbviewer ]
Machine Learning
- Please see my
pattern_classification
repository at https://github.com/rasbt/pattern_classification
Geometry
- Counting points inside a hypercube [ GitHub ] [ Jupyter nbviewer ]
- Vectorizing a classic
for
-loop in NumPy for calculating Euclidean distances [ GitHub ] [ Jupyter nbviewer ]
Efficiency
- Finding the Maximum Pairwise Product [ GitHub ] [ Jupyter nbviewer ]
- Fibonacci Numbers [ GitHub ] [ Jupyter nbviewer ]
- Greatest Common Divisor [ GitHub ] [ Jupyter nbviewer ]