Update README.md

added pseudo code to readme.md