Skip to content

Conversation

@docto-rin
Copy link
Owner

def insert(
self, intervals: list[list[int]], newInterval: list[int]
) -> list[list[int]]:
start, end = newInterval
Copy link

Choose a reason for hiding this comment

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

listをアンパックしているのでnewIntervalのサイズが2ではない場合にValueErrorになるなと思ったのですが、入力の制約上必ずサイズが2になるので大丈夫か、などと思いました。

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