All random tests(JS) show: Expected 1. Which cannot be considered as right answer with given arrays.
Maybe this is broken?
And as Jake just approved the Ruby translation, who am I to pass on the chance to make a Crystal one? Because I do also statically typed now, ah!
Fixed, thanks for the feed :)
Python 3.4.3, examples run fine, but when getting to the random tests, I get "NameError: name 'collatz' is not defined". I make no reference to an object of that name in my code.
Oh, sorry. Yeah, sure.
Can we close the issue now, then :)?
It may be a coincidence, but my solution sorts same Collatz length items then not by lowest index but by lowest value, and that satisfied the tests.
This why specs are important I guess .. :P
Edit: it was a coincidence. :] It did not always satisfy the random tests.
There is an example for that, I think, but you made a good point; I think I will update the description according to the author's assumed intentions.
Edit: that being: if more than an item has the same collatz length and that is the max, take the first one.
When multiple answers are possible, description does not specify which one to return.
This comment is hidden because it contains spoiler information about the solution