Update README.md

Added an explanation of how the algorithm works.