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.
JS: Added random tests. Updated to
Node 22.x.Will now test with empty arrays, and very probably with arrays with all
trueand allfalseresults.There are now.
@HartlIKS
qsort_s(and all the_sfunctions,sfor "secure") are in the optional C11's Annex K (aka the "Bounds-checking" library akaSTDC_LIB_EXT1).Codewars uses C18, so the compiler version is not the issue here. The issue is that most major C standard libraries (including glibc that's used on Codewars) do not implement the optional Annex K, because it's an awful and useless library. It's supposed to be more secure by reducing the probability of buffer overflow mistakes, but it fails miserably and only displaces the issues.
The interfaces of these functions are clunky and redundant. Among the major vendors, only Microsoft implements them in MSVC, but their version of the annex K is not even fully compatible with the C standard, there are several discrepancies in the functions' signatures... Just forget that the
_sfunctions exist, they are a deprecated mistake and will never be widely used.Quite an easy and simple kata.
I dont understand why so many people are mad about this kata... Yes, it asks you to modify the original array but its just a practice thingy...
Personally I liked it
This comment is hidden because it contains spoiler information about the solution
Worst kata I have ever seen
not a kata suggestion
fixed
This comment is hidden because it contains spoiler information about the solution
Loading more items...