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 an old solution. It worked with 2.4/ES6, for example, but type constraints are now way tighter and it doesn't work anymore with 4.2, yes.
Click the "test" button :)))))
I'm not sure if the types of properties are rightly infered if you don't define them in Animal::constructor. At least my limited testing suggest it doesn't (they are all
any
).So you lose all typescript goodness with the parameters.
Start small. Write out by hand the solutions to smaller problems such as groupSize(1, 6), groupSize(1, 7), groupSize(1, 8), and so on. As you do so you may see a certain kind of pattern.
Can you give me a hint to solv it? I already red something about Gauss sums and series of numbers, but haven´t found a better solution.
The description should be includet a hint like: Cant be solved with loop because D is to large. Then I wouldn´t tried it.
The
D
argument can be as high as1e19
. Of course, linear solutions will not work.This comment is hidden because it contains spoiler information about the solution
As per ferencDobi's comment, the random tests make this harder than a typical 7 kyu kata.
Codewars was updated! And now it supports ES6 target for Typescript. Now you can solve this kata! :)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Ah, ok. Thanks for all the TypeScript katas :)
Sorry about that. Fixed that! (don't forget to export Cube, i.e. export class Cube { ... }).
Actually I'm waiting for "target: ES5 option" (see https://github.com/Codewars/codewars-runner-cli/issues/418).
So this kata currently is in "Draft" status...
I did this one by defining the getters and setters via
Object.defineProperties
in the constructor (as a workaround for not yet being able to transpile to ES5+). But now I'm getting these errors when attempting the kata:Loading more items...