Implemented different algorithms
Finished.