---
title: "Discussion on \"Best Time to Buy and Sell Stock II\" | Hashnode"
description: "Discussion on \"Best Time to Buy and Sell Stock II\". Problem\nYou are given an integer array prices where prices[i] is the price of a given stock on the ith day.\nOn each day, you may decide to buy and/or sell the stock. You can only hold at most one share of the stock at any time. However, you can sell ..."
url: "https://hashnode.com/posts/best-time-to-buy-and-sell-stock-ii/693e9bd9f5d7e4410fb1e35f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Best Time to Buy and Sell Stock II](https://chetan77.hashnode.dev/best-time-to-buy-and-sell-stock-ii?utm_source=hashnode&utm_medium=feed)

Problem You are given an integer array prices where prices\[i\] is the price of a given stock on the ith day. On each day, you may decide to buy and/or sell the stock. You can only hold at most one share of the stock at any time. However, you can sell ...

Dec 14, 2025 · 5 min read · chetan77.hashnode.dev  
Read the article

-   [#best-time-to-buy-and-sell-stock-ii](https://hashnode.com/tag/best-time-to-buy-and-sell-stock-ii)
-   [#dynamic-programming](https://hashnode.com/tag/dynamic-programming)
-   [#dsa](https://hashnode.com/tag/dsa)
-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#java](https://hashnode.com/tag/java)

## Written by

[Chetan Datta](https://hashnode.com/@chetan77)

@chetan77 · Hyderabad, India

  
[View profile](https://hashnode.com/@chetan77)

Software Engineer

I share my learnings here. Thanks for reading.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
