Skip to content

Adding Tree Traversal in Swift #317

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
merged 4 commits into from
Aug 6, 2018
Merged

Adding Tree Traversal in Swift #317

merged 4 commits into from
Aug 6, 2018

Conversation

Wesley-Arrington
Copy link
Contributor

Added Tree Traversal in Swift

@june128 june128 added the Implementation This provides an implementation for an algorithm. (Code and maybe md files are edited.) label Jul 30, 2018
Copy link
Member

@jiegillet jiegillet left a comment

Choose a reason for hiding this comment

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

I only found one issue. That being said I don't know Swift, so I'd like to wait a bit more for maybe an extra opinion.

if node.children?.count == 2 {
dfsRecursiveInOrderBinary(node: node.children![0])
dfsRecursiveInOrderBinary(node: node.children![1])
print(node.value)
Copy link
Member

Choose a reason for hiding this comment

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

For in order, print(node.value) has to come in between the children.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made a commit to correct this mistake 👍

Copy link
Member

@jiegillet jiegillet left a comment

Choose a reason for hiding this comment

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

In the absence of a true Swift reviewer, I will take the role and approve this PR.

@jiegillet jiegillet merged commit 61cf9ef into algorithm-archivists:master Aug 6, 2018
@Wesley-Arrington Wesley-Arrington deleted the treeSwift branch August 6, 2018 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implementation This provides an implementation for an algorithm. (Code and maybe md files are edited.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants