Problem link:- CodeChef: Practical coding for everyone
The author has mentioned:- βa1,a2,a3β lie on a line.
By this I assume , in the tree , any 3 nodes, in which there is a connection between a1 and a2, a2 and a3
Now, the confusing part is:- The same author mentions in the comment section that on that path (a1βa2----a3) each vertex should have a degree of atmost β2β .
Why is this thing not mentioned in the problem statement ?
In the same problem, testcase answer is :- (3,2,4) where node-β2β has a degree of β3β (which is contradictory to what author said in the comments)
Now, I am really confused . Please tell me the correct and proper meaning of :- βa1,a2,a3β are in a lineβ¦
Update:- My query has been resolved⦠thanks to the community