Ad
  • Custom User Avatar

    'heaven' and 'java' have 'av' in common, there are 4 letters different (h removed, both 'e's changed, n removed)
    'heaven' and 'php' have only 'h' in common, there are 6 letters different (p added, e changed, a,v,e,n removed)

  • Custom User Avatar

    There's nothing more humbling than finishing a performance kata and then seeing all the elegant solutions ;_;

  • Custom User Avatar

    Make a new version of this kata that throws everything at the user in the tests? Punctuation, numbers, mid-word hyphens, contractions, make them capitalize the new first letter if the original was capitalized (Hello -> Ellohay)

    It would not be as easy as this one.

  • Custom User Avatar

    I don't normally like oneliners but this was a good chance to drop one, no regex required.

  • Custom User Avatar

    I think it's the first case, as you said it is written:

    Interesting numbers are 3-or-more digit numbers that meet one or more of the following criteria:

    So first and foremost, they need to have 3-or-more digits.

  • Custom User Avatar

    According to the description exactly as stated, if you put a 2-digit number in awesome_phrases (like 69) then it should not signal when reaching this number. Is that the expected behavior? Or should awesome_phrases be an exception to the 3-digit mileage rule?

  • Custom User Avatar

    You could make this a little more difficult by also accepting negative amounts (formatted correctly ;) and requiring the function to throw an error if the running total drops below zero.. it's fine for beginners though.

  • Custom User Avatar

    hey!

    thanx for the feedback :D I'll check this out!

    Graphics definetly should be remastered...

  • Custom User Avatar

    I think some people are still confused by the ASCII jumping ;)

    It might help to show the edge case where the rabbit is at the far fence: e.g. [3,1,0,0],0 and [4,1,0,0],0 both have the rabbit jump and land on the end position of the field. In the first case the rabbit faces right and will bounce back onto the final bean; in the second one, the rabbit faces left and misses it.

  • Custom User Avatar

    Modified accordingly, thanks

  • Custom User Avatar

    If there is coffee in the glass, the bottom layer is always filled with \ character.

    I initially understood this to mean that if prg>0, then the bottom layer is always filled. But in fact if prg is so low that it does not fill even the first layer, then it is empty too.

    Maybe it could be clearer with "The slashes alternate between layers, starting with \ in the lowest one and / in the next layer."

  • Custom User Avatar

    Seeing some of the solutions, I am glad I avoided regex for this one.

  • Custom User Avatar

    literally the first line

    string[] delimiters = new string[] { " ", ",", ".", ":", "_", "-", "/", "", ";", "!", "?" };

    these are not the only delimiting characters, you need to split on everything that isn't in [a-zA-Z] and '

  • Custom User Avatar

    MFW you submit a solution and then immediately see the shortcut that everyone else used in their solutions

  • Custom User Avatar

    The very definition of test-driven development! The description is lost just like you, but you don't need it. Just go and pass the tests.

  • Loading more items...