What is the time complexity of balancing parentheses algorithm?
(a) O (N)
(b) O (N log N)
(c) O (M log N)
(d) O (N^2)
I need to ask this question from Application of Stacks topic in portion Application of Stacks of Data Structures & Algorithms I
I had been asked this question by my college professor while I was bunking the class.