3/15/2020 6:45:41 AM
my java is poor😔
but the labels of nodes have no meaning.
Call them a, b, c if u want.
from node1 to node5 you have to walk edges 0 and 4.
lowest label of none walked edge is 1.
--> example of picture
I'm using different approach.
First assigning label to leaves (0,1,2,..) then assigning labels to nodes left.
Why this code giving tle
My approach is first assigning numbers from 0 to all the leaves then the left node assigned
Issue with Scanner class 😕. Used BufferedReader.. Got accepted
Send us a message