Created
February 11, 2024 18:23
-
-
Save Allan-Gong/2570c411e0b9ef1a88c690e04091e2d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 2. 給兩個相同長度的integer array, 分別表示從A城市到B城市每天去程和回程的票價. | |
* 要找出來回票價加總最便宜是多少,規定不能同天來回, 回程要在去程之後. | |
* 舉例: departure=[10, 8, 9, 11, 7], arrival=[8, 8, 10, 7, 9], | |
* 那結果是15 (departure[1] + arrival[3] = 8 + 7 = 15) | |
*/ | |
public class CheapestFlights { | |
public int cheapeast(int[] from, int[] to) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment