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
Lua translation!
C Translation (author inactive).
wow!! that's nice
Removed the performance requirements from PHP as the reference solution was not working anymore in current PHP versions without increasing available memory of the PHP process.
Ruby: Missing sample and random tests.
perfect
JavaScript fork (author inactive)
chai
assertionsclass
andconst
, including in the initial codeAnother great kata challenge! This is very helpful for learning about accessing subarray indexes. Thanks!
Lua translation!
In R the naive solution may timeout, depending on the random test rolled. And since mine failed on the first try, I introduced memoisation. Sumbitted, passed (not sure now if coz of luck or not) and found the naive solution to be the "best" one.
Meh. :(
If imported properly as you shown, no prob.
If imported with
from solution import *
, you can import other symbols: seems obvious but it is often done, even in production code.Always better to avoid trivial names in test suite - that might collide with other imports/libraries.
I still would like to understand. only
f
andm
are imported:symbols used in
f()
andm()
will still refer to their value insolution.py
, not to the ones intest.py
, even if those happen to have the same name, wont they ? what am i mising ?Can still collide with user-defined functions though - as they are imported into test suites.
Nevertheless referee solutions have now a non-trivial suffix, so this issue is no longer relevant.
Loading more items...