Tested alg for large.txt file input