Hacker News new | ask | show | jobs
by z3t4 3357 days ago
i recently failed a programming test after acing all tests except one where i needed a text diff and pulled in a library instead of writing my own in less then ten minutes. they said i need to get better at algos. which is fair. but i dont know anyone that can program a decent working text diff in less then ten minutes.
2 comments

Based on your description, it sounds possible they were just looking for a Levenshtein distance implementation, which is definitely in the Universal Weird Corpus of Interview Questions and for which people who prepare for interviews a ton would have a good shot.
I ported a diff algorithm (a simple one at that) just a few months ago because the language I was working in didn't have one. I couldn't do it off the top of my head today, or probably the day after, it was transient knowledge that I didn't even try to remember.