-
2 Comments
This solution fails sometimes, and I have no idea why (it's just a "smart" brute force code). I've tried to reproduce the error several times on my pc, but I wasn't able to. And I've even tried to use python's long to no avail . Probably I am underfitting at some cases, but it works sometimes. :)
Hello, Rafael.
There is definitely some issue.
From my perspective in writing the Test Suite a solution should either pass all of the Tests every time, or else fail at least one test every time.
I have therefore increased the number of testing iterations in selected Tests, and your solution consistently fails the revamped Tests 4, 5, and 6; it may also fail some other Tests that haven't been amended (e.g. Solution 3651713 failed test 7a).
I have also added quite a bit of detail in the rejigged failure messages so that you can identify problematic parameter values.
—DIV
Suggested Problems
-
Return the 3n+1 sequence for n
8347 Solvers
-
2633 Solvers
-
Find the peak 3n+1 sequence value
2526 Solvers
-
890 Solvers
-
Determine the number of odd integers in a vector
755 Solvers
More from this Author32
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!