Skip to content

Problems solved : Competitive coding 10 - #467

Open
sneha-tambade wants to merge 1 commit into
super30admin:masterfrom
sneha-tambade:Competitive-Coding-10
Open

Problems solved : Competitive coding 10#467
sneha-tambade wants to merge 1 commit into
super30admin:masterfrom
sneha-tambade:Competitive-Coding-10

Conversation

@sneha-tambade

Copy link
Copy Markdown

No description provided.

@super30admin

Copy link
Copy Markdown
Owner

Strengths:

  • Your solution for the Buy and Sell Stock problem is efficient, both in time (O(n)) and space (O(1)).
  • The code is clean and straightforward, making it easy to understand.
  • You correctly identified the greedy approach: capturing every upward price movement.

Areas for Improvement:

  • Although the solution is correct, it would be helpful to add a brief comment explaining the strategy. For example: "We can capture all positive daily price differences to maximize profit."
  • You included an unrelated file (PeekingIterator.cs) in your submission. In the future, ensure that you only submit the solution for the given problem to avoid confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants