题目:

Say you have an array for which the ith element is the price of a given stock on day i.

Design an algorithm to find the maximum profit. You may complete at most k transactions.

Note:
You may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).

相关文章:

  • 2021-09-30
  • 2021-08-31
  • 2022-12-23
  • 2021-10-20
  • 2022-01-10
猜你喜欢
  • 2021-06-15
  • 2021-08-07
  • 2021-06-23
  • 2021-08-04
  • 2021-11-11
  • 2022-12-23
相关资源
相似解决方案