Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Added tasks 566, 567, 572 #229

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

Merged
javadev merged 1 commit into javadev:main from ThanhNIT:tasks-566-567-572
Jan 5, 2022
Merged

Conversation

Copy link
Contributor

@ThanhNIT ThanhNIT commented Jan 5, 2022

No description provided.

Copy link
Owner

javadev commented Jan 5, 2022

We need more tests for task 572

image

Copy link
Contributor Author

ThanhNIT commented Jan 5, 2022

We need more tests for task 572

image

TreeNode treeNode =
TreeUtils.constructBinaryTree(new ArrayList<>(Arrays.asList(3, 4, 5, 1, 2)));
TreeNode subTree = TreeUtils.constructBinaryTree(new ArrayList<>(Arrays.asList(4, 1, 2)));
assertThat(new Solution().isSubtreeFound(treeNode, subTree), equalTo(false));
Copy link
Owner

@javadev javadev Jan 5, 2022

Choose a reason for hiding this comment

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

It should be true

image

@Test
void isSubtreeFound() {
TreeNode treeNode =
TreeUtils.constructBinaryTree(new ArrayList<>(Arrays.asList(3, 4, 5, 1, 2)));
Copy link
Owner

@javadev javadev Jan 5, 2022

Choose a reason for hiding this comment

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

We don't need new ArrayList<>( wrapper.

ThanhNIT reacted with thumbs up emoji
Copy link
Contributor Author

@ThanhNIT ThanhNIT Jan 5, 2022

Choose a reason for hiding this comment

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

I will update

javadev reacted with thumbs up emoji
Copy link
Owner

@javadev javadev Jan 5, 2022

Choose a reason for hiding this comment

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

I prepared a fix.

ThanhNIT reacted with thumbs up emoji
Copy link
Contributor Author

@ThanhNIT ThanhNIT Jan 5, 2022

Choose a reason for hiding this comment

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

thanks

@javadev javadev reopened this Jan 5, 2022
Copy link
Owner

javadev commented Jan 5, 2022

@javadev javadev merged commit c0a937c into javadev:main Jan 5, 2022
Copy link

sonarqubecloud bot commented Jan 5, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@javadev javadev javadev left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /