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.
*GOOD
It's certainly not the clearest, especially the part about the "initial value". It makes sense in the context of a sum, but what about a GCF or LCD? What's an initial value got to do with a max or min?
This might [ wongly ] be classified as a "much more efficient solution".
Pumping up the random tests to
500 000
times, I was unable to discern any difference in speed.Because both solutions are
O(n)
, having larger tests should not be necessary; having more tests should adequately show any performance differences.Input data was being logged to the console - I took that out.
The same question.
I have solution but it seems that only one case that will not work
6 kyu I think
Where is "much more efficient" solution? I did not see.
DDDDD:
No, there are not. It doesn't matter if you walk the list once or a fixed, limited number of times; it's still
O(n)
. Microoptimisations do not affect the Big-O complexity.A decent compiler ( which Node might not have, but eg. Haskell does ) would only walk the list only once anyway. It's a simple transformation. Don't optimise prematurely.
This searches through the list for each age it needs to check though; there are much more efficient solutions so whilst it's readable I don't think it can be called the best.
The best solution I think
GOD
I didn't understand why your ass explodes. 6 kyu sometimes is easier, so this kata must be 6 kyu - based on logic of this site but not illogical comment from person who make 7 kyu tasks if looking at your profile
8 kyu?
the task is not too hard.
even iam a newbie can do this.
the problem was only in math.ceil cause i know only round and floor, and in zero input
formula isnt hard, people(not programmers of mathematics) do this everyday when choose wallpapers
to those who writes about ceiling and floor
Omg! its a wallpaper! not floorpaper or ceilingpaper! wtf!
generally, you can just ignore this message
Hi
I don’t understand, this kata can be solved in js?
"Caution: This kata does not currently have any known supported versions for JavaScript. It may not be completable due to dependencies on out-dated libraries/language versions."
Loading more items...