0
balanced parenthesis
I am trying to make the program called"balanced parenthesis". This is the basic application of stack. However, I got stuck and could not get it done. I understand the logic of this problem but I cannot put it into the code. https://code.sololearn.com/cNU8yLka03Y9/#py
37 Answers
0
i did it but forgot to save it. i will write it here:
string=“(((hello)))”
def ch(string):
for i in string:
if i in “[{(“:
print(“o”,end=“”)
if i in “)]}:
print(“c”,end=“”)
else:
print(“.”,end=“”)
ch(string)
0
sr iam wrong
0
https://code.sololearn.com/cNU8yLka03Y9/?ref=app
here bro. Just check it. THanks:)))
0
I don't want to use you, bro. In my middle school in VN, In time I was in 8th grade, I was struggled with math. I had a friend to teach me,bro. He was just like you,bro. He made me understand the problem by subdividing it into smaller probs. He sometimes blamed me because I was dumb; however, I was not sad. He was so motivated. therefore, I got higher grade on math tests in 9th grade and did math better in high school. That's the value of cooperating. By the way, what school are you in and how old are you?
0
I can post answers on this app and if you see my questions, just answer them. Or if you don't want to answer, just ignore them. I really want to study in group,bro:))
0
hey bro. I am doing the assignment called next greater element. At first, I thought I got it right. But it turned out that I got it wrong. I know the logic, but I could not compile it correctly
0
I already printed out the NGE . But my code was wrong. I will show you my codr
0
You can arrange the lines of your code first for more readability. Otherwise, it is incompréhensible.
- 1
yeh i will do it
- 1
after i do it, can you show me more step
- 1
so I got it wrong,right?
- 1
oh the if statement gives me the same output
- 1
thanks bro
- 1
i will do it tonigjt iam busy now
- 1
here bro
- 1
thanks bro
- 1
i will do it when i get home
- 1
hey,bro
- 1
i will do it this morning
- 1
I'am about to finish it