I'll believe it when I see it.
After pulling my hair out, I have a couple of suggestions. The problem is to find the 'best estimate,' which I and many others attempting this problem took to be the mean expected value, the solution sought after historically. It's actually asking for the most likely single value. I suggest editing the problem description to make that clear.
I now see that the most likely value will always be m. In the process, I discovered that some of the test cases violate the assumptions of the problem, cases where the maximum value observed is less than the number of samples. I would correct this for the sake of those who don't immediately realize that the most likely single value will always be the maximum value observed.
The lack of clarity and problems with the test cases caused me to waste a good deal of time.
Thanks for the suggestions. I really did not want the problem to expel-out the solution that it is "asking for", but let players figure that out from the description given in "To pass this problem you must be exactly correct in at least 10% of the testsuite cases". I understand this can feel misleading, but the point was to make this problem more like a "escape room" puzzle than an straight up homework problem. And regarding the "incorrect" test cases, the tests are probabilistic, so of course in some of them your "optimal" solution will not get the number of samples right, but that is perfectly fine, 10% success rate is all that is expected/required to pass this problem
I only reach 8.5% :-(
Well done, sir (and on your first try! You are clearly paying attention to the details :)
Read a column of numbers and interpolate missing data
Increment a number, given its digits
Arrange Vector in descending order
Back to basics 17 - white space
Polite numbers. N-th polite number.
feeling VERY lucky?
poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
Say something funny
Knave in the middle attack
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office