scan and compare from start, TODO KMP algo
overlap intervals