Skip to content

153. Find Minimum in Rotated Sorted Array #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fhiyo
Copy link
Owner

@fhiyo fhiyo commented Jul 16, 2024


n: len(nums)
- 時間計算量: O(log n)
- 空間計算量: O(n)

Choose a reason for hiding this comment

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

O(1)じゃないですか?引数のnumsを考慮に入れている?

Copy link
Owner Author

Choose a reason for hiding this comment

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

引数のnumsを考慮に入れている?

そうです、ですが空間計算量というときにauxiliary spaceだけでなく入力も含めるのが一般的なのかいまいちよく分からないんですよね...

辺りを見ると入力含める方が普通なのかな?と思い入れるようにしてみてるんですが。

Choose a reason for hiding this comment

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

Auxiliary Space Complexityという名前があるのを初めて知りました。LeetCodeの公式の解説だとSpace ComplexityをAuxiliary Space Complexityの意味で使ってますね。

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