Skip to content

Cometitive-coding-10-complete - #462

Open
PrasiddhShah wants to merge 1 commit into
super30admin:masterfrom
PrasiddhShah:master
Open

Cometitive-coding-10-complete#462
PrasiddhShah wants to merge 1 commit into
super30admin:masterfrom
PrasiddhShah:master

Conversation

@PrasiddhShah

Copy link
Copy Markdown

No description provided.

@super30admin

Copy link
Copy Markdown
Owner
  • Problem1.java:

    • Strengths: The solution is efficient and correctly captures all profitable transactions. The approach is straightforward and easy to understand.
    • Areas for Improvement: The comments could be more detailed to explain why the approach works (i.e., why it's optimal to buy and sell whenever the next day's price is higher).
  • Problem2.java:

    • Strengths: The solution correctly implements the PeekingIterator with optimal time and space complexity. The code is clean and well-commented.
    • Areas for Improvement: The comment for the next method could be clarified to explain that nextEl is set to null before checking for the next element to ensure correctness.

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