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.
Sorry, but the only reason a
#
might get "lost somewhere along the line" is because of your code. The test in question is perfectly valid. Please re-examine your method by focusing on this one test and see what you can do to make it work. One technique for this is to adapt the sample tests to only contain this one test until you can figure it out. Then the rest should come clear. Good luck!I only used printf locally to debug the function. Ok that is strange. The links in my first message, are from failed tests in codewars and are clearly missing the #. If I test the last link you posted, locally, it returns "www.Inquisition.com/Spanish/?page=42#nobody-expects-it" just fine.
Edit: A few other addresses that did not pass the test.
submitted: https://sausage.mil
expected: https://sausage.mil
submitted: spam.orgwww.tomato.mil
expected: spam.org
Test Passed
Test Passed
submitted: www.spam.govbeans.net
expected: www.spam.gov
Test Passed
Test Passed
submitted: http://tea.orgor.edu
expected: http://tea.org
Test Passed
submitted: http://www.tea.milnt
expected: http://www.tea.mil
Test Passed
Test Passed
submitted: https://sausage.orgrg
expected: https://sausage.org
submitted: www.tomato.orge.org
expected: www.tomato.org
submitted: www.toast.intg
expected: www.toast.int
okay, for starters, did you ever
printf
the input? because there IS a#
in the input for the 'Inquisition' test:"www.Inquisition.com/Spanish/?page=42#nobody-expects-it"
This comment is hidden because it contains spoiler information about the solution
LOL! that's a certified facepalm, thanks @stɛffan153. But hey @noexcuses, I still want to see your code to help you out so I can resolve this issue.
@rowcased It looks confusing, but the link you say is broken (it is) is the submitted value itself. It's not a link to the submitted value ;)
You know, this kata has to do with urls.
Hi @noexcuses, I did the translation to C and I will be happy to examine your code, but those links didn't work. Please post your code with proper markdown (also click on the spoiler tag) and I'll take a look.
c-kata seems to have some issues with the testcases.
one example how some a fails:
submitted: www.Inquistition.com/Spanish/?page=42errent.com
expected: www.Inquistition.com/Spanish/?page=42
to me it seems, that there is a missing # in the link provided, which than obviously can't be dedected by my solution. locally run tests work perfectly and even some of the codewars-tests pass without any issues.
you are right. my mistake :)
Has anybody an idea why I get a "Test Error: Oups" or what this could mean?
I tested my function with [0, 7, 10, 2, 4, 3, 5,102] and get [10, 2, 4, 102] in return.
wow, thats an awesome solution!