How to answer this Question ? Recently asked in Google interveiw
Anonymous User
1235

The Question that is asked is just opposite of this Question(https://leetcode.com/problems/find-leaves-of-binary-tree/ ) : Means we have given the Map =[2=[z,b] , 1=[e] ] with height = [leaf values] . Construct the tree in such a way lower height leaf should come on the left hand side and if 2 leaves has same height , than alphabetically sorted value should come on left hand size . All other values ( non leaf values) , we can put *. I was unable to solve ? any idea how to solve this ?

Answer

                    *
					
			 e.         *
			 
			        b.       z
					
	  here E dont have any child , b and z are children of *				    
Comments (5)