-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Morris Preorder traversal #11776
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
Morris Preorder traversal #11776
Conversation
Methods: | ||
-------- | ||
insert(value: int) -> None: | ||
Insert a value into the binary tree following binary search tree (BST) rules. | ||
|
||
morris_preorder_traversal() -> List[int]: | ||
Perform preorder traversal and return list of node values. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Methods: | |
-------- | |
insert(value: int) -> None: | |
Insert a value into the binary tree following binary search tree (BST) rules. | |
morris_preorder_traversal() -> List[int]: | |
Perform preorder traversal and return list of node values. |
I don't think it's necessary to specify the methods in the docstring because the methods themselves should already be documented anyway.
Returns: | ||
-------- | ||
List[int]: | ||
A list of integers representing the preorder traversal. | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns: | |
-------- | |
List[int]: | |
A list of integers representing the preorder traversal. | |
Returns: | |
-------- | |
A list of integers representing the preorder traversal. |
See my comment on your previous PR: #11774 (comment)
@tianyizheng02 I've implemented the changes you requested. Could you review them and let me know if there are any further adjustments needed? |
Describe your change:
Checklist: