subject

Points We can use a stack to check whether a given string has balanced parentheses or not. If you see an opening parenthesis, push it into the stack. If you see a closing parenthesis, pop the top element (if exists) from the stack and check whether the popped element and the closing parenthesis are a matched pair. After you have dealt with all characters in the given string, it turns out that the stack is not empty. Which of the following will result in the non-empty stack?
a. (1+3)5+(6+8)3)
b. ((4+79(2+6)+8)"9
c. 14+5(8-2)(3+73)
d. 2+(3+6)*(6/5)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
question
Computers and Technology, 23.06.2019 03:00
What are the different parts of computer
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
Which option allows you to view slides on the full computer screen?
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
You know the right answer?
Points We can use a stack to check whether a given string has balanced parentheses or not. If you s...
Questions
question
Mathematics, 03.06.2021 19:00
question
Mathematics, 03.06.2021 19:00
question
Mathematics, 03.06.2021 19:00
Questions on the website: 13722367