Compute Turnstile Crossing Times | Google Coding Question