Skip to content

Competitive coding 10 done - #458

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

Competitive coding 10 done#458
desaiparam wants to merge 1 commit into
super30admin:masterfrom
desaiparam:master

Conversation

@desaiparam

Copy link
Copy Markdown

No description provided.

@super30admin

Copy link
Copy Markdown
Owner
  • Strengths:
    • Both solutions are correct and efficient, with optimal time and space complexity.
    • The code is well-commented and easy to understand.
    • The approach for buysell2.py is intuitive and captures all possible profits from upward trends.
    • The peekingiterator.py implementation correctly handles the peek functionality without advancing the iterator.
  • Areas for Improvement:
    • In buysell2.py, the variable name selling could be more descriptive, such as current_profit or day_profit, to better reflect its purpose.
    • In peekingiterator.py, the print(self.nextElement) statement in the hasNext method seems unnecessary and could be removed unless it's for debugging purposes.

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