You can obtain these quartiles by first finding the median of the dataset, then using it to divide the data into two equal halves. If the original array has an odd number of values, do not include the median in the upper or lower half. If the original array has an even number of values, just split it equally.
Is there anything missing or unclear about this description? Perhaps an example will help?
There are 2 types of random test, one to ensure that you remove all outliers, the other to ensure that the data is unchanged if there are no outliers. Since the initial code just returns the data completely unchanged, this will pass cases where non-outliers are not removed.
I'm not seeing that all random tests pass with initial code, just the ones that should. Can you confirm on your end?
(eta: I have updated the tests now as well for accuracy and clarity)
Thank you!
This comment is hidden because it contains spoiler information about the solution
Rejected by someone :-(, Do publish a forked version with a new suggestion ! ^^
Description should now be more clear
duplicate of this issue
Updated random tests, let me know if you spot any more issues with those!
The description has a section on this:
Is there anything missing or unclear about this description? Perhaps an example will help?
Fixed - thank you so much!
Fixed - thanks so much for catching this!
There are 2 types of random test, one to ensure that you remove all outliers, the other to ensure that the data is unchanged if there are no outliers. Since the initial code just returns the data completely unchanged, this will pass cases where non-outliers are not removed.
I'm not seeing that all random tests pass with initial code, just the ones that should. Can you confirm on your end?
(eta: I have updated the tests now as well for accuracy and clarity)
nailed it
Yes, I will only use those for huge descriptions from now on.
done
Fixed
Fixed
Loading more items...