Skip to content

Create 06_Invert Binary Tree.md - #9

Open
Kitaken0107 wants to merge 1 commit into
mainfrom
Kitaken0107-patch-10
Open

Create 06_Invert Binary Tree.md#9
Kitaken0107 wants to merge 1 commit into
mainfrom
Kitaken0107-patch-10

Conversation

@Kitaken0107

Copy link
Copy Markdown
Owner

Comment thread 06_Invert Binary Tree.md
Comment on lines +57 to +59
temp = root.left
root.left = root.right
root.right = temp

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Python には、
a, b = b, a
というイディオムがあります。

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.

値交換するときに積極的に使ってみます
ありがとうございます

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