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.
i already told you why below, you replace the newline characters for no reason , the description does not ask for this
Despite its name, the C standard does not mandate that implementations of
qsort()
use the quicksort algorithm. In fact, it does not even require aO(n log n)
complexity forqsort()
, though of course most clibs will make it as fast as possible because it is an important function. So you cannoy rely on its stability.That being said, it seems like the glibc standard library (the one used on Codewars, which runs on Linux) uses mergesort in most cases; and "most merge sort implementations produce a stable sort". Do not rely on it though, it is an implementation detail. If you need a stable sort, make it stable yourself, e.g. by comparing the pointers themselves in case of structural equality.
You just have to consider what the specs are for this kata. The degree to which 'y' is used as a vowel depends on the rules of the spoken language.
test_ans
should be made inaccessible to the user, e.g. by making it a proc or a lambda:https://docs.codewars.com/languages/ruby/authoring#reference-solution
(to be more precise: the initial code in TypeScript does not compile)
didnt realize i had editing rights, done
in JavaScript, assertio messages are truncated;
chai.config.truncateThreshold
should be set to0
why do you replace the newlines ? the description does not ask this
duplicate of this issue
duplicate of this issue
duplicate of this issue
the testing code should be moved from preloaded to tests in C++
in Java,
assertArrayEquals
should be used instead of stringifying the arrays, which produces confusing assertion messagesyour solution is not robust because it uses a space separator that it then splits on to produce the pairs. that's assuming that the input string never contains spaces, which is not true in the random tests. not a kata issue.
the error comes from your code, you removed the
const
qualifier from the input (std::string &s
instead ofconst std::string &s
). As a result, the tests cannot find your function. this is a linker error, unrelated to the warning for comparison of signed and unsigned integers.Loading more items...