Explain algorithm in README.