4 ms·
The interview question I was referring to is the appointment overlapping one. It's a middle school math question and it's a lot easier than failing over a datab
by lopatin 9y ago
The interview question I was referring to is the appointment overlapping one. It's a middle school math question and it's a lot easier than failing over a database without data loss.
- nsxwolf 9y agoI've been doing this for 20 years and I'm not even sure where I'd start on your middle school math question. I hate working with calendars and dates and I don't think I know anyone who enjoys it and can write totally bug free code that takes care of all edge cases. I'm sure good at fighting database fires though. This probably is at the heart of the answer to the question "how could this programmer with such a long resume have botched this interview so badly?" It would be insane to believe they've never added value to any organization and have just been coasting along all this time. Maybe your interview sucks and isn't good at finding value.
- lopatin 9y agoDon't over complicate it. Given two number ranges, of UTC timestamps, determine if they overlap. I think you know where to start with that.
- throwaway29292 9y agoI'd probably go for 4 if() checks, some 'less than'/'greater than'/'&&' checks should do it.