The best data structure to check whether an arithmetic expression has balanced…

GATE · 2004 · CSISRO Scientist/Engineer SC · May 2017 · Computer Science

The best data structure to check whether an arithmetic expression has balanced parentheses is a

  1. A.

    queue

  2. B.

    stack

  3. C.

    tree

  4. D.

    list

Attempted by 3178 students.

Show answer

Correct answer: B

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…