Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
fft
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Fun with algorithms

This repository was created during the study of Introduction to Algorithms, Third Edition By Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein book.

A well-written book with detailed implementation of algorithms.

List of algorithms presented in the book.

Sort algorithms comparison

Table of complexity of different sorting algorithms:

Algorithm Worst case Average case
Insertion Sort O(n^2) O(n^2)
Merge Sort O(n*ln(n)) O(n*ln(n))
Heap Sort O(n*ln(n)) O(n*ln(n))
Quick Sort O(n^2) O(n*ln(n))
Counting Sort O(k + n) O(k + n)
Radix Sort O(d(k + n)) O(d(k + n))
Bucket Sort O(n^2) O(n)

Matrix multiplication

  • Naive matrix multiplication O(n^3)
  • Strassen matrix multiplication O(n^2.81)

Performance charts

For plot beautiful performance chart run following command.

python sort/performance.py

Sort performance chart

python matrix/performance.py

Matrix multiplication performance

Additional

Useful links:

Linked Lists

Binary Tree

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.