0 votes 0 votes While evaluating the expression tree, if the left or right child is not present then the value of that particular missing child is taken as 0? Have a look at this question In my evaluation, I am getting: ( (a-0) - b ) - 0 + e! = a-b+e! Answer is given as option c but by this approach, I am getting option (d) as the answer. DS expression-evaluation data-structures + – garvit_vijai asked Sep 11, 2018 garvit_vijai 502 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply arvin commented Sep 11, 2018 reply Follow Share i think the value is satisfied only when a=b and e=0... i am getting only one value.. 0 votes 0 votes Deepanshu commented Sep 11, 2018 reply Follow Share @garvit_vijai OPTION D HOW ??? WE WANT 1 . IN OPTION D e =1 ,, WE DONT WANT THIS NEGATION SYMBOL. SO E ALWAYS BE 0 0 votes 0 votes garvit_vijai commented Sep 11, 2018 reply Follow Share 1! = 1, So, option 4 also satisfies 1 votes 1 votes Deepanshu commented Sep 11, 2018 reply Follow Share @garvit_vijai I MISUNDERSTOOD THAT SYMBOL AS NEGATION :\ YEPP THEN OPTION 4 ALSO SATISFIES.. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes On solving this expression we got a+b+e! On putting a=-b and e=0 we got 0! Which is equals to 1. So option 1 is correct On putting a=-b and e=1 we got 1! Which is eauals to 1. So option 2 is correct, Hence 1 and 2 are correct So the answer is (c). Mohit Pandit answered Oct 12, 2018 Mohit Pandit comment Share Follow See all 0 reply Please log in or register to add a comment.