Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
I have exactly the same problem trying this in CoffeeScript. I'll create an issue for this.
Glad to have kept you stimulated up to a positive solution, then :)
When I attempt to pass the randomized test cases, i see other data after my output.
[ { location: 'DEU', ammonia: 165, nOxide: 132, cMonoxide: 164 },
{ location: 'USA', ammonia: 141, nOxide: 184, cMonoxide: 160 },
{ location: 'AUS', ammonia: 120, nOxide: 159, cMonoxide: 190 },
{ location: 'BHS', ammonia: 151, nOxide: 103, cMonoxide: 104 },
{ location: 'BRB', ammonia: 192, nOxide: 106, cMonoxide: 174 },
{ location: 'CHN', ammonia: 159, nOxide: 160, cMonoxide: 143 },
{ location: 'COG', ammonia: 180, nOxide: 184, cMonoxide: 193 },
{ location: 'CRI', ammonia: 110, nOxide: 173, cMonoxide: 132 },
{ location: 'ISL', ammonia: 193, nOxide: 151, cMonoxide: 147 },
{ location: 'VEN', ammonia: 143, nOxide: 145, cMonoxide: 163 } ]
And the tester program prompts "TypeError: _.where is not a function"
Does anyone have the same problem?
Hey, I finally solved it.
Once I found the formula i needed for this problem. I solved it in minutes
This problem is challenging and rewarding, I will recommend people to try it.
don't worry. still tackling it.
Oh, I didn't know it: thanks for providing me such an info, but actually that should not be the bottleneck: try somewhere else :)
I don't know which gcd algo is the fastest.
https://en.wikipedia.org/wiki/Binary_GCD_algorithm
The wiki says this gcd implementation is effiecient
"Akhavi and Vallée proved that, in theory, binary GCD can be about 60% more efficient (in terms of the number of bit operations) on average than the Euclidean algorithm"
What's a "binary gcd"? You know there is a fast and good algo for the gcd, right?
How many test cases are there?
It timeout after running 1500 test cases.
When I googled, it says to find the gcd of numerator and denominator.
So I wrote a binary gcd for my solution, then it timeout when the input is 123456789 or 9999999999.
I am lost.
As always, googling the problem should easily gives you the required pieces to solve the kata.
I fear that would be equivalent to give you the solution, sorry.
That does mean that the whole bunch of tests has to execute in less than 12s.
You'll have to optimized your code. ;)
Loading more items...