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 12:30
What characteristic of long period comets suggest they come directly from the oort cloud?
Answers: 2
question
Computers and Technology, 22.06.2019 20:40
Assume that there is a 4% rate of disk drive failure in a year. a. if all your computer data is stored on a hard disk drive with a copy stored on a second hard disk drive, what is the probability that during a year, you can avoid catastrophe with at least one working drive? b. if copies of all your computer data are stored on three independent hard disk drives, what is the probability that during a year, you can avoid catastrophe with at least one working drive?
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Which type of tab stop is most for weights and measurements?
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Scientists have changed the model of the atom as they have gathered new evidence. one of the atomic models is shown below. what experimental evidence led to the development of this atomic model from the one before it? a few of the positive particles aimed at a gold foil seemed to bounce back. the colors of light emitted from heated atoms had very specific energies. experiments with water vapor showed that elements combine in specific proportions. cathode rays were bent in the same way whenever a magnet was brought near them.
Answers: 2
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
History, 29.11.2020 21:50
question
Mathematics, 29.11.2020 22:00
question
Arts, 29.11.2020 22:00
question
History, 29.11.2020 22:00
question
Mathematics, 29.11.2020 22:00
Questions on the website: 13722359