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.
same here.. did this same thing with string builder :D..
I think this should be 7kyu.
same problem here, new learner so feeling stupid
This comment is hidden because it contains spoiler information about the solution
Disregard, this is clearly not python. Facepalm
Yes, this would be good to identify any duplicate kata. My next challenge is the Sudoku solver. As you can see here, I already knew how to do what was done. Any new programmers please be very careful here, make sure to watch these "deplicate" kata very closely, especially the higher ranked kata. They are very tough to spot, but once you know where they are hiding, then report them right away, they are very sneaky.
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/162.
Please join the discussion to help us identify duplicate kata and retire them.
But don't throw exception with null and str.length() < 2
You're right hobovsky, didn't pay attention to that. Thank you!
You missed this part:
There is even a corresponding sample test case:
expect(arr()).to.deep.equal([]);
The function is incorrectly typed out of the gate on TypeScript. It spits out this error, independently of whatever I try to do in the function:
TSError: ⨯ Unable to compile TypeScript:
test.ts:6:12 - error TS2554: Expected 1 arguments, but got 0.
6 expect(arr()).to.be.an('array');
~~~~~
solution.ts:1:21
1 export const arr = (n: number[]): number[] => {
~~~~~~~~~~~
An argument for 'n' was not provided.
test.ts:10:12 - error TS2554: Expected 1 arguments, but got 0.
10 expect(arr()).to.deep.equal([]);
~~~~~
solution.ts:1:21
1 export const arr = (n: number[]): number[] => {
~~~~~~~~~~~
An argument for 'n' was not provided.
test.ts:14:16 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'number[]'.
14 expect(arr(4)).to.deep.equal([0,1,2,3]);
Your code should handle that.
ArgumentCountError : Too few arguments to function arr(), 0 passed in /workspace/default/tests/ExampleTest.php on line 10 and exactly 1 expected
Edit: this is in the PHP version
how do can i make random i know that we can genrate but how can i make for pass the cases damn ;)
Loading more items...