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.
This kata was unpublished by its author and moved to draft. Drafts do not accept new solutions.
For some reason I can't submit my code even if it was accepted in the test and the attempt
In the string
abcdeaB
, a occurs twice, b occurs twice (as b and B).Therefore, there are two duplicates (
a
andb
).Because your code is case sensitive, it only counts
a
as one duplicate.I hope this helps.
If you see that error message, then it isn't returning 1.
The function returns 1 and it says
Why is a right answer showing as wrong? Wierd!
Dude, really! Aww man do you know how long I've tried to find that, like what is "strstr"? No one would ever find that procedure. Thanks hobovsky.
I'm unpublishing this kata while I learn how to improve it and probably make it a lttile more challenging, and add some random tests ;)
Thank you!
This comment is hidden because it contains spoiler information about the solution
are you speaking of Codewars or the C language?
Some authoring help for C: https://docs.codewars.com/languages/c/authoring
Unfortunately, tasks which are meant to reimplement a built in are not really good Codewars kata. Restrictions are very easy to work around, and difficult to enforce.
I see what you mean now. Can you give me some pointers on how I can improve this Kata?
It isn't really about checking the strings for anything except if either of them are less than one character or if the length of the partial string is larger than the length of the whole string. Otherwise, it's more about checking if the whole string contains the partial string.
Loading more items...