121. Best Time to Buy and Sell Stock

maintain the "max_profit" and "min_price".

public class Solution {
    public int max_profit(int[] prices) {
        int min_price = Integer.MAX_VALUE;
        int max_pro = 0;
        for (int i=0; i

你可能感兴趣的:(121. Best Time to Buy and Sell Stock)