check if can traverse a circle of gas stations, AC