Search⌘ K
AI Features

Best Time to Buy and Sell Stock II

Best Time to Buy and Sell Stock II gives daily stock prices and asks for the maximum profit from unlimited buy-and-sell transactions, holding at most one share at a time.

Statement

You are given an integer array, prices, where prices[i] is the price of a stock on the ...