134. Gas Station
1.問題
在這個加油站可以補充gas[i], 但到下個加油站時將會消耗cost[i], 請問從哪個點出發可以順利順時針旅行一圈回到原本的加油站?
2.想法
提問
function header, parameter
test input
觀察
選擇出發的加油站
環遊一圈
說明想法
測試計算複雜度
3.程式碼
Last updated
在這個加油站可以補充gas[i], 但到下個加油站時將會消耗cost[i], 請問從哪個點出發可以順利順時針旅行一圈回到原本的加油站?
提問
function header, parameter
test input
觀察
選擇出發的加油站
環遊一圈
說明想法
測試計算複雜度
Last updated