3 ms·
> Ruby and python are worth a try too, but often they make things so easy that the interviewer disregards the answer--many common string manipulation interview
by catnaroek 13y ago
> Ruby and python are worth a try too, but often they make things so easy that the interviewer disregards the answer--many common string manipulation interview questions are one-liners in ruby.
The problem is not that they are one-liners, the problem is that the algorithm is already implemented for you as a library function, and you just call it.
OTOH, in Haskell a one-liner could perfectly contain the whole description of an algorithm.
- never_again 13y agoWrite max flow in one line.
- cronin101 13y agoI don't think that this is a deal-breaker though. In my opinion the best response you could give in this situation is: "I would use <Library function> [showing you know libraries], however if this was not available I would implement it operating on characters as follows... [showing you understand algorithms]". A good interviewer isn't going to huff because you have "foiled his master plan to trick you", since they are exploring the limits of your understanding.
- catnaroek 13y agoIf you cannot use libraries in a typical dynamic language, stuff is almost always just as inconvenient as in Java or C++.