update readme
fix code that ran in O(n^2) to run in O(n)
update readme