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.
Not gonna lie I love how simple this one is, its easy to understand +1
This is a better point. Subdomains aren't in the scope of this problem and would require a list of legal domain extensions to distinguish.
Nope it doesnt, tried on www.xaker.maindomain.ru
True but subdomains are quite tricky since checking the length doesn't solve the problem. Your solution passes if the test is e.g. "images.google.com" but fails with e.g. "google.com.au". I don't know how to take that into account but it's an interesting question.
That is true. However, I was just focused on the requirements given in the kata.
This looks like it will catch subdomains. Nice.
Would this not fail with subdomains?
Are there urls like www.www.etc.?
This would fail with subdomains, e.g. images.google.com would return images
This would fail with subdomains, e.g. images.google.com would return images
This was a perfect test case for me to illustrate my problem. Works fine on everything except for that instance. That said, I don't know how to resolve it in either case.