import java.util.*; public class Solution { /** * 理解:求价格数组中紧邻的递增差值的总和中最大的; * 想象价格数组为一个折线图,求出折线图中所有的上升段的和 * [7,1,4,3,2,5] * * @param prices int整型一维数组 * @return int整型 */ public int max_profitv2 (int[] prices) { // write code here int len=prices.length; int max=0; int temp=0; int last=0; for(int i=0;i&...