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.
What does this mean?
It would be really nice way to ban cheaters. Put something useless in your code and everyone who just copies it should be banned.
You should print the inputs to see--> https://docs.codewars.com/training/troubleshooting
These two lines add an index for faster regex matching, look up pg_trgm in the docs for more details. It works with provided dataset but there is a downside for searching like this. For example, if a prospect named
Annabelle Smith
exists and I need to findAnna Smith
then the query will return a false positive.This comment is hidden because it contains spoiler information about the solution
the problem is that all comments appear in the dashboard of any user. ;)
Oops. I did originally mark as spoiler but then it unchecked when I edited.
I did wonder though, given that this is in the solutions section, wouldn't it only be seen by people who have already solved/given up?
spoiler flag! x/
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Hi,
Not an issue, a question. Generic message below, for some context:
Seems you're "rather new" to cw, so here are some general guidelines about the comments:
Issue
: problem in the kata itself (description, wrong tests, wrong internal solution...)Suggestions
: well, I guess that part is clearQuestion
anything else that is related to you having a problem solving a kata -> that's you, currently.When you post issues:
When you post a question: well, most of the above apply too x)
When you post code, use proper github markdown, so that it's readable.
So, seems you're doing java. Your problem is that you trim the spaces "everywhere" while you should do it at some specific places (edit: careful about the rules for new lines)
I'd urge you to actually print to the console a representation of the actual string, and not just the string itself, so that you see the different kind of space characters. =>
s.replace(" ",".").replace("\n"," \\n")
, for example.closing & cheers
I'm finding some confusion about trailing spaces. When attempting the tests, if I don't remove trailing spaces I get
If I trim white spaces
Very efficient solution!
True, it's not necessary. Not sure why I did that.
This is really nice code. Just one question...for the seconds, why is it necessary to do
(seconds%3600)%60
? Surelyseconds%60
would be sufficient?Loading more items...