加油站算法

public class GasCircuit { int gas[];//每一個加油站的油數量 int cost[];//從i-i+1須要i數量的汽油 public void canCompleteCircuit(int[] gas, int[] cost) { this.gas = gas; this.cost =cost; /** *依此遍歷
相關文章
相關標籤/搜索