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 was my first 'Aha! I know this!' moment.
The description "sorted in asc order" should be corrected to "sorted in ascending order."
this was very very easy. Did it in like two minutes. Perhaps if you are new to JavaScript, it may be a bit harder. just have to think of what methods to use. sort is a tricky method. Pay close attention to it
too easy
The description states that both input arrays are sorted, which while technically correct is slightly misleading (they can be sorted in either order, which one may not expect). I'd suggest clearly indicating they can be sorted in either order, not just ascending.
Might just be a me problem though
This comment is hidden because it contains spoiler information about the solution
Approved
Approved
CoffeeScript translation
This really shouldn't have been translated to COBOL. It being 8kyu is insane considering the task and what's available (which is comparable to C).
Your solution falls into an infinite loop for following test case:
assert.deepEqual(mergeArrays([ -3, -2, -1, 0 ], [ 1, 2, 3, 4 ]), [ -3, -2, -1, 0, 1, 2, 3, 4 ]);
.Your solution has a bug, it's not a kata issue.
Hi! I receive the error:
Fatal error in , line 0
Fatal JavaScript invalid size error 169220804
#FailureMessage Object: 0x7ffda2482340
1: 0xbd7061 [node]
2: 0x1dfa6b4 V8_Fatal(char const*, ...) [node]
3: 0xeeb3a8 [node]
4: 0x10997b2 [node]
5: 0x1099a75 [node]
6: 0x12a813b v8::internal::Runtime_GrowArrayElements(int, unsigned long*, v8::internal::Isolate*) [node]
7: 0x16e99f9 [node]
I tested my code with any combinations of arrays including empty. I can get the same error in my IDE if I send as argument just number instead array. Is it all Ok with tests? Is it possible to get all tests?
This could be easily marked as 6 kyu or Medium speaking leet code rankings.
C#
I'm newbe. After 3 days of coding, I'm surprised to see one line solution. Yes I know, there are only three parts for solving the kata:
1)union of two arrays;
2)sorting;
3)removing of duplicated numbers;
First and second point I have completed for 10 minutes. The bigest problem for me was the removing of duplicated numbers.
Unfortunately I don't know algorithm for searching and removing of duplication. So who want to see my own algorithm which is using only FOR cicle and if/else". Welcome.
good kata!
Loading more items...