in Algorithms
604 views
0 votes
0 votes

in Algorithms
604 views

5 Comments

Doesn’t matter .either we assign to ‘0’ to left and ‘1’ to right node  or ‘1’ to left and ‘0’ to right node but we should not do both of them simultaneously . we should try any one of the way .
0
0
then in the 2 nd tree value of A 00, 11 both are possible?
0
0
yes .but depending on the convention you have used . It is implementation dependent . if i implement the code considering i will put left edge as ‘0’ and right edge as ‘1’ then A will get code as “00” .
0
0
if nothing is mention then left side children have zero and right side children have 1 if mention then do with corresponding it .
0
0
if nothing mention go with the option .
0
0

1 Answer

0 votes
0 votes
This is purely based on implementation and there is no hard and fast rule for that

Related questions