News for hackers. Stuff that matters.
Re:How to Interview Engineers by dcwca on Monday June 26, 2017 @06:41PM (#14641022)
That's half of it, but doesn't account for the case when starttime[1] is later than endtime[2] and they don't intersect.
Re:How to Interview Engineers by hoosieree on Monday June 26, 2017 @08:14PM (#14641528)
It works if you assume that appointment 1 starts before appointment 2 starts (or if you explicitly sort them by start time).

e.g. in J:

       'a b c' =: 50 60 3 4;3 50 49 99;2 10 10 12  NB. 3 different sets of appointments
       3 :'ok`nope{~0>*./-~//./:~_2]\ y' every a;b;c
    ┌──┬────┬──┐
    │ok│nope│ok│
    └──┴────┴──┘
Re:How to Interview Engineers by pinot on Monday June 26, 2017 @07:39PM (#14641350)
Good point. I didn't think about them not being written down in the list in chronological order by start time.