Count super-streak segments in an event stream | Google Interview Question