We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hi, Can anyone please let me know why I'm getting Runtime Error in the below Python Code while submitting the below code. I'm not sure what the issue is, Is it from backend of HackerRank platform or anything?
defisBalanced(s):# Write your code hereres=[]dic={'{':'}','[':']','(':')'}foriins:ifiindic:res.append(i)else:ifi!=dic[res.pop()]:return'NO'ifres:return'NO'return'YES'
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Balanced Brackets
You are viewing a single comment's thread. Return to all comments →
Hi, Can anyone please let me know why I'm getting Runtime Error in the below Python Code while submitting the below code. I'm not sure what the issue is, Is it from backend of HackerRank platform or anything?