"def is_valid(s: str) -> bool:
stack = []
closeToOpen = { ")" : "(", "]" : "[", "}" : "{" }
for c in s:
if c in closeToOpen:
if stack and stack[-1] == closeToOpen[c]:
stack.pop()
else:
return False
else:
stack.append(c)
return True if not stack else False
debug your code below
print(is_valid("()[]"))
`"
Anonymous Roadrunner - "def is_valid(s: str) -> bool:
stack = []
closeToOpen = { ")" : "(", "]" : "[", "}" : "{" }
for c in s:
if c in closeToOpen:
if stack and stack[-1] == closeToOpen[c]:
stack.pop()
else:
return False
else:
stack.append(c)
return True if not stack else False
debug your code below
print(is_valid("()[]"))
`"See full answer
"Goals :
Determine if the TV series should be renewed
If it should be renewed, how much should Netflix be willing to pay for this series
Let's assume that the goal is to maximize subscriber retention and engagement while paying a reasonable amount for the licensing costs that is justified by the value added by the series.
Assumptions :
The show is exclusive to Netflix for a particular region (for eg. US)
It has been on the platform for an year
Netflix has subscriber level data around"
Saurabh K. - "Goals :
Determine if the TV series should be renewed
If it should be renewed, how much should Netflix be willing to pay for this series
Let's assume that the goal is to maximize subscriber retention and engagement while paying a reasonable amount for the licensing costs that is justified by the value added by the series.
Assumptions :
The show is exclusive to Netflix for a particular region (for eg. US)
It has been on the platform for an year
Netflix has subscriber level data around"See full answer