Cepton interview question

they asked to implement a disjointed-intervals program