no its not, the real problem was the a lot loops there is in my code. But my code pass all tests without any problem except the last. Because, one the test is a random test like a number of 5 figures when my code try to solve it, is when the time begins. But thanks i resolve it, i eliminate some innecesary lines and works now
i have a problem, the page said me my code is very slow(12000ms) but when i test it on my pc its works fine like Tiempo de ejecuci├│n(execution time): 186 microsegundos(microseconds). I think its internets speed . Somebody Can affirm this ?
Test(Sample_Cases, should_pass_these_three_tests) {
cr_assert_eq(duplicate_count("abcde"), 0);
cr_assert_eq(duplicate_count("abcdea"), 2);
cr_assert_eq(duplicate_count("indivisibility"), 6);
} these are the corrects tests , because in the original we have the second and the third one wrong , the letter i repeats 6 times but in the original say ONE ! ( i think this is wrong=)
Would you like to tell how this code works?=?
i can do it. Let me try it.
i love it ! i will save this solution as mine just bc i dont want to lose this masterpiece jaja !
i love it
This comment is hidden because it contains spoiler information about the solution
no its not, the real problem was the a lot loops there is in my code. But my code pass all tests without any problem except the last. Because, one the test is a random test like a number of 5 figures when my code try to solve it, is when the time begins. But thanks i resolve it, i eliminate some innecesary lines and works now
i have a problem, the page said me my code is very slow(12000ms) but when i test it on my pc its works fine like Tiempo de ejecuci├│n(execution time): 186 microsegundos(microseconds). I think its internet
s speed
. Somebody Can affirm this ?how i can save this kata¿
papaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa q grande eres ! como q 3 lineas de codigo mi hermanooooooooooooooooooooooooooo... felicidades.
This comment is hidden because it contains spoiler information about the solution
yes i understand! thanks.
#include <criterion/criterion.h>
#include <stddef.h>
size_t duplicate_count(const char* text);
Test(Sample_Cases, should_pass_these_three_tests) {
cr_assert_eq(duplicate_count("abcde"), 0);
cr_assert_eq(duplicate_count("abcdea"), 2);
cr_assert_eq(duplicate_count("indivisibility"), 6);
} these are the corrects tests , because in the original we have the second and the third one wrong , the letter i repeats 6 times but in the original say ONE ! ( i think this is wrong=)