check isOverlap dijkstra