+1 vote
in Data Structures & Algorithms I by (110k points)
Which of the following statement is invalid with respect to balancing symbols?

(a) [(A+B) + (C-D)]

(b) [{A+B}-{C-[D+E]}]

(c) ((A+B) + (C+D)

(d) {(A+B) + [C+D]}

The question is from Application of Stacks topic in chapter Application of Stacks of Data Structures & Algorithms I

This question was posed to me in an interview for job.

1 Answer

+1 vote
by (408k points)
selected by
Best answer
Right answer is (c) ((A+B) + (C+D)

The best explanation: ((A+B) + (C+D) is invalid because the last close brace is not found in the statement.

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.