Update README.md

added the algorithm.