Skip to content

Leetcode merge two sorted lists#8

Open
Igneaalis wants to merge 9 commits intomasterfrom
LEETCODE-merge-two-sorted-lists
Open

Leetcode merge two sorted lists#8
Igneaalis wants to merge 9 commits intomasterfrom
LEETCODE-merge-two-sorted-lists

Conversation

@Igneaalis
Copy link
Copy Markdown
Owner

Added LEETCODE "Merge two sorted lists" solution.

@Igneaalis Igneaalis requested a review from Vivelapaix June 1, 2020 19:51
linked-list.md Outdated
tail.next = b
b = b.next
tail = tail.next
tail.next = a or b
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

or - логический оператор. Как это так в Python будет выбран нужный список?
Это не совсем очевидный код. Краткость порождает вопросы, лучше сделать два if

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@Vivelapaix да, именно так и будет выполнено в Python. Я переделал.

Copy link
Copy Markdown

@Vivelapaix Vivelapaix left a comment

Choose a reason for hiding this comment

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

Там была другая сигнатура методов. Называя все по-своему, без должного вдумывания, ты делаешь хуже только себе

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