LeetCode MEDIUM 122 Best Time to Buy and Sell Stock II Summary
Generated by Codex with GPT-5
Difficulty: MEDIUM
Problem: Best Time to Buy and Sell Stock II
Problem gist
The input is a list of stock prices where prices[i] is the price on day i. The goal is to make as much profit as possible by buying and selling any number of times.