Ad
  • Default User Avatar

    Mmmh, Safari refuses to show the images in the description of this kata due to a certificate issue. When I open it in Chrome it seems the formulas did not render very well. Deciphering the formula seems to be the hardest bit...

  • Default User Avatar

    I had tagged it as "Fundamentals". I am not able to say who has added the other tags.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    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...

  • Custom User Avatar

    Already approved.

  • Default User Avatar

    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