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.
Copied this over from SO, didn't have a lot of time to work through the math. This is a very cool problem, several of the better answers are worth studying in some depth.
Honestly, in actual production coding-for-real-money-as-a-career, deciphering verbal gimmicks, as in "WTF is Product/CEO/Marketing talking about?" seems to be the main part of being an experienced senior engineer.
This comment is hidden because it contains spoiler information about the solution
Thank you.
Thanks for checking, still no love for me, but I'm feeling more inspired to see how fast I can get it in Ruby.
s/sum/product/
Need to specify how no argument is handled.
For anyone wondering why this might be useful, I've to implement and debug long, complex SQL queries generated from hierarchal ActiveRecord models.
Intensely tedious and nitpicky work.
FWIW, my opinion at the time, and my current opinion, is that was the wrong way to do it.
This is pretty interesting comment as I've written a fair bit of code, in Ruby, in the last month, using regexes, to prevent sql injection.
But at 8 kyu, I am unable to understand what is required to pass the specs, and cannot justify any further time to figure it out. There are much more interesting problems which are much better worded.
Perhaps this problem just doesn't work as described in Ruby? Could it be removed? Deprecated?
Apparently most people are having trouble in most languages.
This makes no sense for Ruby.
This would be a good one for Ruby!
Had to submit twice, a couple of the random tests on the first submission were bogus. Second submission worked.
And the Ruby modulo or % solution.
I don't see any way around looking at every entry, worst case. There might be an average case O(log2 n) using bisection, but I haven't worked it out.
Loading more items...