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(csharp): add csharp code for array binary tree #632

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

hpstory
Copy link
Contributor

@hpstory hpstory commented Jul 20, 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).
  1. add code for array binary tree
  2. rewrite utils/TreeNode.cs
  3. add extension method for print nullable list

Test result:

1
2

@vercel
Copy link

vercel bot commented Jul 20, 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) Jul 20, 2023 6:36am

}
}

public class array_binary_tree {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This part of code is different with others. Because ArrayBinaryTree class doesn't have a default constructor for test framework, resulting in a test failure, so move it outside of the class.

Copy link
Owner

Choose a reason for hiding this comment

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

I see. C#'s rule is the same with Java.

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 for the clean code!

@krahets krahets merged commit 2af77ff into krahets:main Jul 20, 2023
@krahets krahets added the code Code-related label Jul 20, 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.

2 participants