Hello,
The following if statement is supposed to check to see if the given values overlap (in any way):
st1, st2 --> starting time
fin1, fin2 --> finishing time
I was supposed to go off of the following given by my teacher:
"things overlap if (starti < startj < finishi) or (starti < finishj < finishi)"
Could anyone please help me figure out why it always returns false??
Thanks in advance!
The following if statement is supposed to check to see if the given values overlap (in any way):
Code:
if( ((st1 < st2)&&(st2 < fin1)) || ((st1 < fin2)&&(fin2 < fin1)) )
fin1, fin2 --> finishing time
I was supposed to go off of the following given by my teacher:
"things overlap if (starti < startj < finishi) or (starti < finishj < finishi)"
Could anyone please help me figure out why it always returns false??
Thanks in advance!