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

feat(tree): Add the array representation of the binary tree(js,ts) #681

Merged
merged 3 commits into from
Aug 13, 2023

Conversation

yuan0221
Copy link
Contributor

@yuan0221 yuan0221 commented Aug 10, 2023

If this PR is related to coding or code translation, please fill out the checklist and paste the console outputs to the PR.

  • I've tested the code and ensured the outputs are the same as the outputs of reference codes.
  • I've checked the codes (formatting, comments, indentation, file header, etc) carefully.
  • The code does not rely on a particular environment or IDE and can be executed on a standard system (Win, macOS, Ubuntu).

@vercel
Copy link

vercel bot commented Aug 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
hello-algo ⬜️ Ignored (Inspect) Visit Preview Aug 11, 2023 1:31am

if (node) {
if (++i >= arr.length) break;
if (arr[i] !== null) node.left = new TreeNode(arr[i]);
if (++i >= arr.length) break;
Copy link
Owner

Choose a reason for hiding this comment

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

Please match this function to other languages'(Java, C++, Python) implementation. We'd like to make the code consistent in terms of all the languages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, I've tested to make sure it's ok, please check

Copy link
Contributor

@justin-tse justin-tse left a comment

Choose a reason for hiding this comment

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

@yuan0221 Thank you for clean code!

@krahets krahets merged commit ec82be7 into krahets:main Aug 13, 2023
1 check passed
@krahets krahets added the code Code-related label Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Code-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants