3 ms·
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. Seem
by travisjungroth 6y ago
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.”
- 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?