"
open = ['(','{','[']
close = [')','}',']']
def is_valid(s: str) -> bool:
pass # your code goes here
n = len(s)
if n == 0:
return True
elif n == 1:
return False
valid = (s[0] == '(' and s[1] == ')') or \
(s[0] == '{' and s[1] == '}') or \
(s[0] == '[' and s[1] == ']')
if valid:
return valid & is_valid(s[2:n])
else :
valid = (s[0] == '(' and s[-1] == ')') or \
(s[0] == '"
Cagdas A. - "
open = ['(','{','[']
close = [')','}',']']
def is_valid(s: str) -> bool:
pass # your code goes here
n = len(s)
if n == 0:
return True
elif n == 1:
return False
valid = (s[0] == '(' and s[1] == ')') or \
(s[0] == '{' and s[1] == '}') or \
(s[0] == '[' and s[1] == ']')
if valid:
return valid & is_valid(s[2:n])
else :
valid = (s[0] == '(' and s[-1] == ')') or \
(s[0] == '"See full answer
"public static int maxProfitGreedy(int[] stockPrices) {
int maxProfit = 0;
for(int i = 1; i todayPrice) {
maxProfit += tomorrowPrice - todayPrice;
}
}
return maxProfit;
}
"
Laksitha R. - "public static int maxProfitGreedy(int[] stockPrices) {
int maxProfit = 0;
for(int i = 1; i todayPrice) {
maxProfit += tomorrowPrice - todayPrice;
}
}
return maxProfit;
}
"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
Data Scientist
Data Analysis
🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.