Re:An interview code submission that wasn’t even submitted c...
by travisjungroth on Tuesday June 09, 2020 @02:33AM
(#23464283)
There 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.”
Re:An interview code submission that wasn’t even submitted c...
by abiogenesis on Tuesday June 09, 2020 @02:50AM
(#23464346)
Fair 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).
Re:An interview code submission that wasn’t even submitted c...
by yomly on Tuesday June 09, 2020 @03:22AM
(#23464518)
If 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.
Re:An interview code submission that wasn’t even submitted c...
by travisjungroth on Tuesday June 09, 2020 @03:23AM
(#23464521)
Oh 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?
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.