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 is written in a vague way. What is the name of the input database?
Can the user even run a basic
SELECT *
FROM table
to see the contents of what are in any given table.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Code challenges are a test, on a test you can't google anything. Additionally, on a math test they tend to give you formulas for things you will encounter. In this case if the formula is provided you are still testing their ability to make it work with the limits placed, and removing the requirement to memorize formulas as I'm sure even senior programmers don't have all math formulas memorized.
Finding an algorithm that works with a certain input range/value is programming work. Is math involved in that? Yes. Should you google for that? Not necessarily.
This comment is hidden because it contains spoiler information about the solution
Current 6 kyu kata level description:
The algorithm that works isn't complex enough to rank it higher (and rank can't be changed anyway). I agree it should be mentioned loop based solutions won't work or something like that to avoid frustration.
Without the
O(1)
it would be a 7 kyu Kata.Edit: The Best-Practice solution has 33 characters + function declaration and is no code golfing, so 6 kyu is more than appropriate.
This is not a 6kyu problem with the optimization requirements being imposed.
Please specify in the Details section that you are forced to be O(1) and that loop based solutions will not work.
Java translation
you may have passed all the Sample Cases, but the Fixed and Random tests have larger numbers. with the error message as your guide, ask yourself; why a range error? which array is affected? what's the invalid length value? which part of my code is causing that? maybe use some console.log() and hunt it down and fix it
I think adding a note about it won't hurt anyone, like "your function will be tested with big numbers" or whatever you think is ok.
it would seem you are using too much memory in processing the data (
JavaScript heap out of memory
). you need to find a more efficient approachLuminux's post contains a discussion talking about it. There is some other one but it's marked as having spoiler content because it has code in it.
Which posts below? I'm not finding one regarding this issue
Loading more items...