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.
ball_test(2, xx___xx_x_xx_x_x_xxx____x______xxx_x_x_xxx____x_____x____x__xx____x_xxxx_xxx__x__x_xx___x___x__x__x_x_x___x______) should be true
Really ?
Edit: Refreshing the page and continuing to test the SAME code eventually resulted in some random tests that my code could pass.
Thanks! I was interpreting it that way, but I needed confirmation and your formulation is much clearer.
In C, I just brute-forced it. The main difficulty for me was importing the MD5 function on Windows. I tried linking MinGW against OpenSSL, but the MD5 function had already been deprecated. Eventually, I realized there are built-in packages in Windows:
#include <windows.h>
#include <wincrypt.h>
#pragma comment(lib, "advapi32.lib")
However, this doesn’t seem to work on Codewars. Not really surprised but what are the alternatives to access the MD5 function on the site ?
Somewhere, a compiler is weeping, but your solution works hopefully!
This comment is hidden because it contains spoiler information about the solution
I have two pieces of code on my machine (one iterative and one recursive), both of which work perfectly well in all cases. However, weirdly, the recursive one fails on the test provided here, even though the arrays for which it fails actually work just fine on my computer. No clue what the issue can be.