Algorithm To Compare Two Strings