Maybe the title of the kata should be changed to "Delete occurrences of an element if it occurs more than n times" or something like that
I got completely confused by it :D
No, I meant the test cases that appear in the "Your test cases" box on the bottom and run when you hit "Run Tests".
Here's some if you wanna put them.
Test.assertEquals([].toString(), "[]", "Should be able to handle empty arrays");
Test.assertEquals([[[[[[]]],[]]]].toString(), "[[[[[[]]],[]]]]", "Should be able to handle empty nested arrays");
Test.assertEquals([1.545,[2,4,[23532],55,2.3,[15.22,0.3,[],[[72,3],5]]]].toString(), "[1.545,[2,4,[23532],55,2.3,[15.22,0.3,[],[[72,3],5]]]]", "Should work with nested arrays");
Test.assertEquals(["foobar",[["hello"]]].toString(), "['foobar',[['hello']]]", "Should enclose strings with single quotes");
Same bro
Yes, but this is a kata, not production.
this one excels
I know thank you
naming conventions should be followed, code should be readable. using e and v is very obfuscated
This is a very good solution: the highest performance (according to test results) and short code
Ohh! Genius!
nice one!
It was something like "Delete the nth occurence of an element"
I don't exactly remember.
What was the previous name?
Haha, many people do, the name of this kata was changed several times will do it asap :).
Ty for advice.
EDIT: done ;).
Maybe the title of the kata should be changed to "Delete occurrences of an element if it occurs more than n times" or something like that
I got completely confused by it :D
It should work, but it doesn't for some reason.
Thank you very much for your example test cases; I have added them :D
No, I meant the test cases that appear in the "Your test cases" box on the bottom and run when you hit "Run Tests".
Here's some if you wanna put them.
Loading more items...