EDIT: solved it. For future users, refer to the previous comment made in this discussion:
It's not clear that the input represents a price timeline where the sale occurs sometime after the purchase, and not, say, a list of shops where you can trade freely.
The library is very nice but it's useless if you don't understand the exercise. How do you calculate the mean if you don't include yourself? Are you a student from another university?
This comment is hidden because it contains spoiler information about the solution
Haskell translation
Did you solve it though? Also don't understand it
EDIT: solved it. For future users, refer to the previous comment made in this discussion:
It's not clear that the input represents a price timeline where the sale occurs sometime after the purchase, and not, say, a list of shops where you can trade freely.
python new test frameworks
Ok thanks, Mauro!
I didn't understand how the first test is supposed to return 6 and the last, -1.
$O(n^2)$
is too slow, the solution should be$O(n)$
.This comment is hidden because it contains spoiler information about the solution
Fixed in python.
Fixed in python.
C: still an issue
Ruby: ok
The spoiler flag XD
Python: In the last 100 random tests, the expected output is always 100. Arrays could be modified to include something more useful.
The library is very nice but it's useless if you don't understand the exercise. How do you calculate the mean if you don't include yourself? Are you a student from another university?
Thanks for teaching me new library
C Translation
Loading more items...