Skip to content

703. Kth Largest Element in a Stream#10

Open
TrsmYsk wants to merge 1 commit intomainfrom
TrsmYsk-patch-6
Open

703. Kth Largest Element in a Stream#10
TrsmYsk wants to merge 1 commit intomainfrom
TrsmYsk-patch-6

Conversation

@TrsmYsk
Copy link
Copy Markdown
Owner

@TrsmYsk TrsmYsk commented Jan 27, 2026

self.v[index1], self.v[index2] = self.v[index2], self.v[index1]

def _shift_up(self, index: int) -> None:
while index > 0:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

これ、_has_parent 定義してもいいかもしれませんが、さすがにやりすぎですかね。

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