#P13071. 【贪心2】买卖股票

【贪心2】买卖股票

题目描述:

给定一个数组 prices,其中 prices[i] 表示第 i 天股票的价格。你需要设计一个算法,找到买入和卖出股票的最佳时机,使得利润最大化。