Algorithm complete (not edge proof, array out of bounds)