Interview Question

Software Engineer Interview Palo Alto, CA

Given two events, each with a start and end time, implement

  a boolean check to see if they overlap.
Answer

Interview Answer

4 Answers

1

s1 - t2 < 0 and s2-t1 < 0

t2 on May 11, 2010
6

!(s2 > e1 || s1 > e2)

sam on Aug 28, 2010
5

!(s1>e2 || s2 < e1)

Anonymous on Sep 24, 2010
1

Was this really the question they asked you? That's ridiculously simple.

Will on Aug 26, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.