Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

An algorithm for "do these strings differ by an edit distance of at most 1?" is much simpler, and should be easy to figure out. No dynamic programming required.


This is something I would expect a freshman CS major to be able to solve.

It only requires knowledge of looping, conditionals, and how to work with strings in your language (e.g, indexing, finding length, maybe substrings, etc.).

This is like a less insulting version of fizzbuzz.

People are way overcomplicating this. Any professional programmer could solve this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: