Skip to content

【Arai60】37問目 121. Best Time to Buy and Sell Stock#37

Merged
shining-ai merged 1 commit intomainfrom
review37
Jun 30, 2024
Merged

【Arai60】37問目 121. Best Time to Buy and Sell Stock#37
shining-ai merged 1 commit intomainfrom
review37

Conversation

@shining-ai
Copy link
Copy Markdown
Owner

Copy link
Copy Markdown

@nodchip nodchip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

よいと思います。

@shining-ai shining-ai merged commit 82f3908 into main Jun 30, 2024
@shining-ai shining-ai deleted the review37 branch June 30, 2024 03:10
Comment on lines +8 to +9
profit = price - min_price
max_profit = max(max_profit, profit)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一度しか使わないのであれば変数にする必要がないかもしれませんね。
max_profit = max(max_profit, price - min_price)

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.

3 participants