"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
"Situation: COVID has impacted everyone's lives, especially small businesses. Earlier this year, during the second lockdown in Malaysia, it was estimated that 50%-70% of small businesses have closed.
It got me thinking, beyond the existing training programmes, what can my company do to support small businesses?
Task:
So, I took the initiative to gather our Comms and Government Affairs team, to work together and explore how we can:
1) meaningfully demonstrate our company's commitment in"
Judy W. - "Situation: COVID has impacted everyone's lives, especially small businesses. Earlier this year, during the second lockdown in Malaysia, it was estimated that 50%-70% of small businesses have closed.
It got me thinking, beyond the existing training programmes, what can my company do to support small businesses?
Task:
So, I took the initiative to gather our Comms and Government Affairs team, to work together and explore how we can:
1) meaningfully demonstrate our company's commitment in"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
"I would use A/B testing to see if the new feature would be incrementally beneficial. To begin the testing, we should define what's the goal of this testing. Let's say the new feature would increase the average number of trade by X. Then randomly assign the clients to two groups, control and test group. Control group doesn't see the new feature and the test group see the new feature. We could also stratified sampling if we want to make sure cover different customer segmentation. During this desig"
Jiin S. - "I would use A/B testing to see if the new feature would be incrementally beneficial. To begin the testing, we should define what's the goal of this testing. Let's say the new feature would increase the average number of trade by X. Then randomly assign the clients to two groups, control and test group. Control group doesn't see the new feature and the test group see the new feature. We could also stratified sampling if we want to make sure cover different customer segmentation. During this desig"See full answer
"\# Definition for a binary tree node.
class TreeNode:
def init(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def maxPathSum(self, root: TreeNode) -> int:
self.max_sum = float('-inf')"
Jerry O. - "\# Definition for a binary tree node.
class TreeNode:
def init(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def maxPathSum(self, root: TreeNode) -> int:
self.max_sum = float('-inf')"See full answer
Data Scientist
Data Structures & Algorithms
+4 more
🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.
"
from typing import List
def getnumberof_islands(binaryMatrix: List[List[int]]) -> int:
if not binaryMatrix: return 0
rows = len(binaryMatrix)
cols = len(binaryMatrix[0])
islands = 0
for r in range(rows):
for c in range(cols):
if binaryMatrixr == 1:
islands += 1
dfs(binaryMatrix, r, c)
return islands
def dfs(grid, r, c):
if (
r = len(grid)
"
Rick E. - "
from typing import List
def getnumberof_islands(binaryMatrix: List[List[int]]) -> int:
if not binaryMatrix: return 0
rows = len(binaryMatrix)
cols = len(binaryMatrix[0])
islands = 0
for r in range(rows):
for c in range(cols):
if binaryMatrixr == 1:
islands += 1
dfs(binaryMatrix, r, c)
return islands
def dfs(grid, r, c):
if (
r = len(grid)
"See full answer
"The distribution of daily minutes spent on Facebook per user is heavily right-skewed with a long tail. Most users spend a short amount of time while a smaller segment of heavy users push up the average with 2–3+ hours daily."
Vineet M. - "The distribution of daily minutes spent on Facebook per user is heavily right-skewed with a long tail. Most users spend a short amount of time while a smaller segment of heavy users push up the average with 2–3+ hours daily."See full answer
"
class ListNode:
def init(self, val=0, next=None):
self.val = val
self.next = next
def has_cycle(head: ListNode) -> bool:
pass # your code goes here
if head is None:
return False
previousNodes = set()
iter = head
while iter:
if iter.val in previousNodes:
return True
previousNodes.add(iter.val)
iter = iter.next;
return False
debug your code below
node1 = ListNode(1)
node2 = ListNode(2)
n"
Cagdas A. - "
class ListNode:
def init(self, val=0, next=None):
self.val = val
self.next = next
def has_cycle(head: ListNode) -> bool:
pass # your code goes here
if head is None:
return False
previousNodes = set()
iter = head
while iter:
if iter.val in previousNodes:
return True
previousNodes.add(iter.val)
iter = iter.next;
return False
debug your code below
node1 = ListNode(1)
node2 = ListNode(2)
n"See full answer
"from typing import List
def find_primes(n: int) -> List[int]:
if n < 2: # Handle edge cases explicitly
return []
Initialize a boolean list to track primality
is_prime = [True] * (n + 1)
isprime[0] = isprime[1] = False # 0 and 1 are not primes
p = 2
while p * p <= n: # Loop until sqrt(n)
if is_prime[p]: # Only process if 'p' is still marked as prime
Mark multiples of p as non-prime
for multiple in range(p * p,"
Anonymous Roadrunner - "from typing import List
def find_primes(n: int) -> List[int]:
if n < 2: # Handle edge cases explicitly
return []
Initialize a boolean list to track primality
is_prime = [True] * (n + 1)
isprime[0] = isprime[1] = False # 0 and 1 are not primes
p = 2
while p * p <= n: # Loop until sqrt(n)
if is_prime[p]: # Only process if 'p' is still marked as prime
Mark multiples of p as non-prime
for multiple in range(p * p,"See full answer
"If you effectively listen and understand their point of view, then take action to address the issue quickly. Don't let too much time slip between the conflict and the resolution. If resolving the concern will take more time, communicate the current status and next steps with the stakeholder."
Abdurhman M. - "If you effectively listen and understand their point of view, then take action to address the issue quickly. Don't let too much time slip between the conflict and the resolution. If resolving the concern will take more time, communicate the current status and next steps with the stakeholder."See full answer
"Over-fitting of a model occurs when model fails to generalize to any new data and has high variance withing training data whereas in under fitting model isn't able to uncover the underlying pattern in the training data and high bias.
Tree based model like decision tree and random forest are likely to overfit whereas linear models like linear regression and logistic regression tends to under fit.
There are many reasons why a Random forest can overfits easily 1. Model has grown to its full depth a"
Jyoti V. - "Over-fitting of a model occurs when model fails to generalize to any new data and has high variance withing training data whereas in under fitting model isn't able to uncover the underlying pattern in the training data and high bias.
Tree based model like decision tree and random forest are likely to overfit whereas linear models like linear regression and logistic regression tends to under fit.
There are many reasons why a Random forest can overfits easily 1. Model has grown to its full depth a"See full answer
"from typing import List
def two_sum(nums: List[int], target: int) -> List[int]:
prevMap = {}
for i, n in enumerate(nums):
diff = target - n
if diff in prevMap:
return [prevMap[diff], i]
else:
prevMap[n] = i
return []
debug your code below
print(two_sum([2, 7, 11, 15], 9))
`"
Anonymous Roadrunner - "from typing import List
def two_sum(nums: List[int], target: int) -> List[int]:
prevMap = {}
for i, n in enumerate(nums):
diff = target - n
if diff in prevMap:
return [prevMap[diff], i]
else:
prevMap[n] = i
return []
debug your code below
print(two_sum([2, 7, 11, 15], 9))
`"See full answer
"
with youngsuccrate as(
select
strftime('%m', postdate) AS postmonth,
round(sum(issuccessfulpost)*1.0/count(issuccessfulpost),2)as yascrate
from
post
where
userid in (select userid from post_user where age between 0 and 18)
group by
post_month
),
nonyoungsucc_rate as(
select
strftime('%m', postdate) AS postmonth,
round(sum(issuccessfulpost)*1.0/count(issuccessfulpost),2)as nonyasc_rate
from
post
where
user_id in (select"
Bhavna S. - "
with youngsuccrate as(
select
strftime('%m', postdate) AS postmonth,
round(sum(issuccessfulpost)*1.0/count(issuccessfulpost),2)as yascrate
from
post
where
userid in (select userid from post_user where age between 0 and 18)
group by
post_month
),
nonyoungsucc_rate as(
select
strftime('%m', postdate) AS postmonth,
round(sum(issuccessfulpost)*1.0/count(issuccessfulpost),2)as nonyasc_rate
from
post
where
user_id in (select"See full answer
" select user_id,
b.marketing_channel
from user_sessions a
Left join attribution b
on b.sessionid = a.sessionid
group by 1,2
HAVING sum(purchasevalue)>100 and min(adclick_timestamp)
`"
G B. - " select user_id,
b.marketing_channel
from user_sessions a
Left join attribution b
on b.sessionid = a.sessionid
group by 1,2
HAVING sum(purchasevalue)>100 and min(adclick_timestamp)
`"See full answer
"I responded with a project that I was a part of during my capstone class. I described how I used HTML, Python, and PostGRESQL in conjunction to create a functioning website using SCRUM."
Kanishkan V. - "I responded with a project that I was a part of during my capstone class. I described how I used HTML, Python, and PostGRESQL in conjunction to create a functioning website using SCRUM."See full answer