Skip to content
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

Update array_binary_tree.cpp #1568

Merged
merged 1 commit into from
Nov 23, 2024
Merged

Update array_binary_tree.cpp #1568

merged 1 commit into from
Nov 23, 2024

Conversation

sslmj2020
Copy link
Contributor

@sslmj2020 sslmj2020 commented Nov 22, 2024

打印的小错误

If this pull request (PR) pertains to Chinese-to-English translation, please confirm that you have read the contribution guidelines and complete the checklist below:

  • This PR represents the translation of a single, complete document, or contains only bug fixes.
  • The translation accurately conveys the original meaning and intent of the Chinese version. If deviations exist, I have provided explanatory comments to clarify the reasons.

If this pull request (PR) is associated with coding or code transpilation, please attach the relevant console outputs to the PR and complete the following checklist:

  • I have thoroughly reviewed the code, focusing on its formatting, comments, indentation, and file headers.
  • I have confirmed that the code execution outputs are consistent with those produced by the reference code (Python or Java).
  • The code is designed to be compatible on standard operating systems, including Windows, macOS, and Ubuntu.

打印的小错误
@sslmj2020
Copy link
Contributor Author

比较的为值,非索引

Copy link

@Justjustifyjudge Justjustifyjudge left a comment

Choose a reason for hiding this comment

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

确实如此,原本判断当前节点是否为nullptr,应该根据这个节点是否有合法值来进行判断,而不是根据这个节点在数组中的index判断

Copy link

@Justjustifyjudge Justjustifyjudge left a comment

Choose a reason for hiding this comment

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

确实如此,原本判断当前节点是否为nullptr,应该根据这个节点是否有合法值来进行判断,而不是根据这个节点在数组中的index判断

Copy link
Owner

@krahets krahets left a comment

Choose a reason for hiding this comment

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

Thanks to @sslmj2020 for the fix and to @Justjustifyjudge for the review!

@krahets krahets added bug Bug fixes code Code-related labels Nov 23, 2024
@krahets krahets merged commit 894e3d5 into krahets:main Nov 23, 2024
4 checks passed
@sslmj2020 sslmj2020 deleted the patch-1 branch November 25, 2024 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes code Code-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants