Update README.md

Added algorithm