+1 vote
in Data Structures & Algorithms I by (88.2k points)
What does the other nodes of an expression tree(except leaves) contain?

(a) only operands

(b) only operators

(c) both operands and operators

(d) expression

My question is taken from Trees topic in division Trees of Data Structures & Algorithms I

I have been asked this question during an interview for a job.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
Correct choice is (b) only operators

Best explanation: The nodes other than leaves always contain only operators. There cannot be any operand in those nodes.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.