Hacker News new | past | comments | ask | show | jobs | submit login

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.

I'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.

Don't over complicate it. Given two number ranges, of UTC timestamps, determine if they overlap. I think you know where to start with that.

I'd probably go for 4 if() checks, some 'less than'/'greater than'/'&&' checks should do it.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact