4 ms·
Another problem is that the answers the recruiters want to see don't change depending on the position. You shouldn't expect a new graduate and a senior develope
by abiogenesis 6y ago
Another problem is that the answers the recruiters want to see don't change depending on the position. You shouldn't expect a new graduate and a senior developer write the same code for the same problem.
I was asked to write a Roman numeral to decimal converter in an interview for a senior developer role. I hadn't thought about it before, so I came up with a lookup table that handled all the special cases (there are only a few, such as IV and IX).
The recruiter (who was also the owner of the startup) didn't like my solution because he expected me to write a generic parser. Now, if I were him, I would have expected a senior developer to correctly determine if the specs for a 2000 year old problem could change in the near future and write the more performant solution when possible.
- travisjungroth 6y agoThere are only seven symbols with two rules. If you skip the subtraction rule and just consider them more symbols, it goes to twelve symbols with one rule. Seems like your solution is more appropriate than a parser. That being said, there’s nothing wrong with saying “I’d like to see you write a parser. Let’s make one for Roman numerals so it’s fast and simple.”
- abiogenesis 6y agoFair enough, but he only said that after I typed in the code and successfully demonstrated that it passed all the test cases (it was a one to one, hands on interview).
- yomly 6y agoIf that fails the interview, especially in a startup interview of all places, then that's a red flag on their end. Shows lack of pragmatism, poor communication and unwillingness to embrace lateral thinking. You came up with a working solution that fell outside the spectrum of what they were expecting. And they couldn't adapt their thinking/hiring process to that so more fool them. In a generous interpretation of the situation they weren't a good fit for you anyway.
- travisjungroth 6y agoOh yeah, sounds like bad communication on his part. How did you handle looking up two characters vs one? Take a pass for all the doubles first and consider those negative? Or keep a history as you loop over it?