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

Adding bottom view binary tree problem solution #130

Merged

Conversation

karimelazzouni
Copy link
Contributor

- Solution based on https://www.geeksforgeeks.org/bottom-view-binary-tree/
- Modified `.gitignore` to ignore Visual Studio's files
@karimelazzouni
Copy link
Contributor Author

Fixes #120

@TheSTL
Copy link
Member

TheSTL commented Oct 23, 2019

Hi @karimelazzouni you can use new Map() instead of installing hashmap dependencies. In es6 new Map() is there to create Map object.

@karimelazzouni
Copy link
Contributor Author

Hi @TheSTL , I implemented the changes. If you have no more comments let's merge this.

package.json Outdated
Comment on lines 23 to 24
},
"dependencies": {}
Copy link
Member

Choose a reason for hiding this comment

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

Can you undo these changes?

}
}

return hdToNodeValue.values();
Copy link
Member

Choose a reason for hiding this comment

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

It should return an array instead of Iterator @karimelazzouni

Copy link
Member

@TheSTL TheSTL left a comment

Choose a reason for hiding this comment

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

Changes required:

  • Remove Unnecessary Changes .
  • Function should return an array from most left child to most right child.

- Removed unnecessary dependencies in `packages.json`
- Changed returned value to array
Copy link
Member

@TheSTL TheSTL left a comment

Choose a reason for hiding this comment

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

Thanks @karimelazzouni for PR. 💯

@TheSTL TheSTL merged commit 2323351 into knaxus:master Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants