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.
No, 1 is correct - the threshold is twice the median of the previous 3 entries -
for 40, the median of 10, 20, 30 is 20, so 40 is >= 2 * 20
for 50, the median of 20, 30, 40 is 30, and 50 < 2 * 30
Having said that, I reckon this is closer to a Hard than a Medium problem.
Getting the correct answer is easy, but I'm so far unable to get the performance I need.
Fraudulent Activity Notifications
You are viewing a single comment's thread. Return to all comments →
No, 1 is correct - the threshold is twice the median of the previous 3 entries -
for 40, the median of 10, 20, 30 is 20, so 40 is >= 2 * 20
for 50, the median of 20, 30, 40 is 30, and 50 < 2 * 30
Having said that, I reckon this is closer to a Hard than a Medium problem. Getting the correct answer is easy, but I'm so far unable to get the performance I need.