5 ms·
> "well, it can be solved by doing $NAIVE_SOLUTION, just to get that out there, and I know you're looking for a better one." I'm at the very beginning of my ca
by ecdavis 13y ago
> "well, it can be solved by doing $NAIVE_SOLUTION, just to get that out there, and I know you're looking for a better one."
I'm at the very beginning of my career, having just accepted a new grad position, but I thought I'd offer my opinion on this: just implement the naive solution. If you're really unsure, ask them if they're OK with you doing that. In my very first interview I took the approach you just described and the interviewer actually stopped me as I was brainstorming other ideas and said, "Just work on the basic solution and we can talk about ways of improving it later." In subsequent interviews I've implemented the basic solution first then talked about the drawbacks of that approach with the interviewer, possible improvements that could be made, etc.
Now, most of the problems I was given were far simpler than what was described in the OP. I do think I was very fortunate to get interviewers who weren't just looking for an outside-the-box solution to some brainteaser they'd concocted. Nonetheless, I think it might be worth considering just taking the naive approach (and telling them what you're doing any why) rather than spending a lot of time trying to come up with a perfect solution.
- Schwolop 13y agoI absolutely agree. As both an interviewee and interviewer I prefer this approach. There's nothing worse than having someone spend 5 minutes waffling or doing very little, then tell you they're going for the complex solution without having shown you the simple one. Honestly, when I interview and ask a question like this, it's a leading question. I want the simple solution as a FizzBuzz style test of your abilities, then I'm going to ask "and what problems can you see with this solution?" and we'll go from there.
- reikonomusha 13y agoIf they request I spell out the naive solution, I certainly oblige. But if it's clear to both the interviewer and me that they are looking for that particular solution, then I won't spend time writing it out. So far, this approach of assuming they want the best solution—while acknowledging the simple solution exists along with a brief sketch of it—seems to be agreeable.
- eclipxe 13y agoYour posts leads us to believe that this is in fact, not agreeable.
- reikonomusha 13y agoWhy's that? I've used that technique in places from which I've received offers (from small non-profits to large multi-billion corps). I think it's a realistic thing to do. If they want me to code the naive way, they can just say so. If they want a better solution, and I sketch out verbally the naive solution and they're happy, why magnify into it? The non-agreeable part is the difficulty with finding a better solution, and spending inordinate amounts of time searching for one.