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

because they asked me to "say" a function for finding the longest common subsequence of a set of strings.

That's rough, asking for a solution to an NP-hard problem over the phone? http://en.wikipedia.org/wiki/Longest_common_subsequence_prob...

Or maybe they were just expecting you to say "for each combination of subsequences of each string, check if they are equal ..."



We may be mishearing their intended formulation, which could have been asking for the longest common substring (described here: difference is that subsequences don't have to be entirely contiguous, just in the same order.)

http://en.wikipedia.org/wiki/Longest_common_substring_proble...

That's an interesting problem with some simple solutions worth understanding. I don't think it would be unrealistic to expect a high-quality programmer to be previously familiar with it, or, if not previously familiar, to be able to make progress toward the DP solution with some thought.


"We may be mishearing their intended formulation, which could have been asking for the longest common substring "

Good Point. And asking a clarifying question would be a very strong positive in a candidate.


No, they wanted a working function. I used Python :-(




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

Search: