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.
Thanks for this clarification. Hopefully the description will be updated.
I was confused by the question's description, then I saw this and solved it in less than 10 seconds.
this description its way more understandable
Thank you. I finally know what I am supposed to code.
Thank you! So frustrating when a kata's most difficult challenge is its poor description.
Thanky you! I was approaching the problem as if it was just looking for the total number of results that contain d, not the total number of times d appears.
I can appreciate what it was going for, but this kata is not a great problem-solving exercise because the requirements are not specific enough.
It should be specified that the test cases will only ever have zero or one subdomains, and if it has one, it will always be "www." In the real world, URLs might include multiple subdomains (that could be anything) and a multi-part top-level domain (e.g. "host.sub1.sub2.domain.co.jp") so the premise is already too vague.
A better exercise would be one that requires you to check an input URL against a predefined set of formatting rules (e.g. there will only be one subdomain, it may or may not have "http(s)", there will be no invalid characters, etc.), and return the domain name if it conforms to those rules, or an error/null if it does not.
Your description helped me understand this kata better. Thank you!
I'm not claiming to have "found something new," I'm just trying to help people understand the description. There are many comments from people who are confused by the wording.
there's not been a problem before, its highly unlikely that you've found something new
in the off chance that you have, publish a fork ;)
Description is extremely confusing so I've rewritten it, hope this helps people in the future: