3 ms·
I feel that you think of the interviews as if they were a competitive programming contest. If I needed a DivRem function I'd just write it in, `import Math` op
by wanderer2323 6y ago
I feel that you think of the interviews as if they were a competitive programming contest.
If I needed a DivRem function I'd just write it in, `import Math` optional. In fact I probably wouldn't remember the exact name of the function and would've just 'created' a new one: `Tuple<int, int> DivideWithRemainder(int dividend, int divisor)`. You can just write signatures for functions like that on a separate side of the whiteboard and invite your interviewer to tell you if they want to see any of them implemented.
I would advice this as a general approach -- split things into (reasonable) parts and implement them in order of importance. In one interview (Amazon) I ended up implementing every small thing I parceled out. In others my interviewers seemed to appreciate that we both care a lot about the `solution flow` and the `technically hard` parts and not at all about `DivideWithRemainder` or `import Math`.
I got offers from most of the places that I interviewed at.