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.
All languages should have sample and fixed tests added for case below:
http://www.google.govt/?x=jsdfkj
http://www.google.acom/?x=jsdfkj
etc...
Interesting kata, seriously, well done.
I'd suggest modifying the description slightly, for clarity:
Apart from that, this kata is essentially approvable imo.
Your hint suggests that it's possible - though not recommended - to change the provided classes.
It is not clear from the description the provided classes are all part of the Preloaded section, and that only the interface itself can be adapted.
I would clarify this in the description.
please specify which level the domain should play a key role in sorting when sorting " other domains"
no,this is just bad.
For anyone else who comes across this Kata, and find the description confusing and missleading. Let me sum it up thusly.
Take all the URI's and sort them by the domain only, ensuring that "COM, GOV, ORG" are returned first, then the rest. Do not sort the actual URI, as this will change the order within the domains. Just sort on the domain.
Hope that helps someone...
Already approved.
Poorly written question, contradicts itself. It seems the author wants urls to be grouped by 'top level domain' (TLD), e.g. 'com', 'gov', etc. but he uses the word 'domain' which is misleading. Then at one point he says URIs should be listed in alphabetical order of domain, but then in additional rules he says ordering of domain not important. Also, it is not clear whether the remaining TLDs need to be in alphabetical order or not. e.g. should '.de' < '.en' or does it not matter?
This whole question can be explained very simply as follows:
Given a list of URIs, return a reordered list of URIs where the URIs are arranged according to their TLDs in the following order:
all URIs with '.com', then all URIs with '.gov', then all URIs with '.org', followed by all other URIs.
e.g. .com < .gov < .org < all other TLDs in any order
OR:
Given a list of URIs, return a reordered list of URIs where the URIs are arranged according to their TLDs in the following order:
all URIs with '.com', then all URIs with '.gov', then all URIs with '.org', followed by all other TLDs in alphabetical order.
i.e. .com < .gov < .org < .de < .en etc
Python translation. Please, review and approve.
Random tests feedback is abyssmal. Can we get more feedback? The sample tests doesn't help either (there's only 1 example), and there's no specification as to what kind of url input will be presented.
that is the point the result could be not unique. as I've mentioned before answers ("c.com","b.com","a.com") and ("b.com","c.com","a.com") are correct, but "c.com,b.com,a.com" != "b.com,c.com,a.com".
But if it would be required to sort uris based on the left part, than it will be another (next) task, with higher difficulty
Hi, thanks for comment, I've tried to explain it with "other part of Uri doesn't affect sorting." if you don't mind I'll add your example to kata desctiption.
Not sure if I can change test because answers ("c.com","b.com","a.com") and ("b.com","c.com","a.com") are equal that's why I've marked kata as 7 kyu.
After my guess and test, that they do not need to sort(between "c.com","b.com","a.com"),
Just in accordance with the original order.
Only need to sort in accordance with the top-level domain name(such as .com/, .org/, etc..),
Hope this will be helpful to the next guy.
Do not understand the rules, need or do not need to sort the coms, govs, orgs?
Can you use a normal test method? I can't see what's happened...
Just give me true or false, this is not the slightest help to me.
Loading more items...