-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
feat: Implemented Morris Inorder traversal for Binary tree #11774
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
Conversation
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.
Some minor nitpicks, but otherwise LGTM
value : int | ||
The value stored at the node. | ||
left : TreeNode | ||
Pointer to the left child node (default is None). | ||
right : TreeNode | ||
Pointer to the right child node (default is None). |
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.
value : int | |
The value stored at the node. | |
left : TreeNode | |
Pointer to the left child node (default is None). | |
right : TreeNode | |
Pointer to the right child node (default is None). | |
value: The value stored at the node. | |
left: Pointer to the left child node (default is None). | |
right: Pointer to the right child node (default is None). |
By convention in this repo, we prefer not to include the types of the function params in the docstrings. This is because the functions themselves should already have type hints, and adding the types in the docstring means that, if we ever change the variables' types, we'd need to update the type hints in two separate places.
Could you make similar changes in the other docstrings as well?
|
||
|
||
|
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.
@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: