We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hello,
Some questions:
I guess we talk about binary tree here, aren't we ?
Does changing a leaf place from left son to right son of a node is considered as a different tree ?
Would it be possible (to clarify) to add the result for a simple test case like: N = 3 and L = 2 or event N = 2 and L = 1, we the different possibility decomposed.
They are definitely not necessarily binary trees. Have a look at http://mathworld.wolfram.com/LabeledTree.html for a definition of labelled trees. I'm having some difficulty finding a good definition of what makes an "unrooted" labelled tree, but that site is a start.
No more comments
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Join us
Create a HackerRank account
Be part of a 26 million-strong community of developers
Please signup or login in order to view this challenge
I have 10 in my house.
@zxqfd555, could you please explain the problem in better manner?
Hello, Some questions: I guess we talk about binary tree here, aren't we ? Does changing a leaf place from left son to right son of a node is considered as a different tree ? Would it be possible (to clarify) to add the result for a simple test case like: N = 3 and L = 2 or event N = 2 and L = 1, we the different possibility decomposed.
Thank you,
Damien
They are definitely not necessarily binary trees. Have a look at http://mathworld.wolfram.com/LabeledTree.html for a definition of labelled trees. I'm having some difficulty finding a good definition of what makes an "unrooted" labelled tree, but that site is a start.