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.
the standard term is "Variably Modified types", and yes they are distinct from VLAs, only the VM types will be mandatory in C23, the VLAs are still optional
Is this really called "VLA declaration"? I always thought that "VLA" is used only to refer to stack allocated arrays with runtime decided size.
no, your prototype is worse. you use the pointer notation for an array, and you dont make it clear that
size
is the length of the array. the only thing wrong with the current prototype is that MSVC does not support VLA declarations, but these will be made mandatory in C23many people have this problem with not enough time to check... so you think first when you write new Kata
You can solve this with pen and paper faster than C. Think first, then code second.
A fast language is not enough to compensate a deficient algorithm. The kata is perfectly fine.
Hi, I wrote this Kata in C, but not enough time to check... fail. What is faster than C ? nothing :D I think this Kata is faulty...
BF translation (author inactive)
Hi, in C language. The prototype of function is writen in not good practice. The variable n do not have to be part of array index. The value must be constant. This is the better writen prototype:
void powers_of_two(unsigned* arr, size_t size);
Fixed by changing class and method names to
FindOccurrence.findNthOccurrence
. Thank you!The basic test does not work.....
Error:
./src/main/java/YourSolution.java:2: error: ',', ')', or '[' expected
public static int findOccurrence(String subStr, String str, int occurrence = 1) {
^
1 error
you need to convert to wanted doubles earlier (separate line), then do all the math on doubles.
then simple int(r) should work
I dont know, I try anything... :D
This comment is hidden because it contains spoiler information about the solution
Are you sure? You are close, but read the instructions carefully. You are missing something important in the description.
Loading more items...