Ad
  • Default User Avatar

    The mathematics are tricky on this one. Definitely harder than 7 kyu. More like 5 or 6 IMO. (Full disclosure: I may just be a little bitter that my first solution wasn't optimal.)

  • Default User Avatar

    Empty array seems to fit the given defintion of "nice" (i.e., "an array where for every value n in the array, there is also an element n - 1 or n + 1 in the array.") For every value of an empty array (i.e., none) there is also an element n - 1 or n + 1 (i.e., none). Should either change the definition and instructions to specify that the array is non-empty or change the test so an empty array returns true.

  • Default User Avatar

    A negative index will eventually throw a NullPointerException when the nodes run out.

  • Default User Avatar

    The description does not adequately describe the task. Should return true only if every letter from part1 and part2 is used in generating the input string. If this requirement is to be derived from the sample cases, then a sample test case should be given to show that leftover letters should return false.

  • Default User Avatar

    To me, "latin letters" would normally mean letters with or without diacritics. Based on the description, I would expect "naïve" to return true.

  • Default User Avatar

    For those (like me) who could not understand the description, the following is used to encode the message (no spoilers, just clarification):

    1. Reverse the message.
    2. Append the password to the end of the reversed-message.
    3. Calculate n fibonacci numbers (1, 1, 2, 3, 5, 8, ...) where n is the length of the password.
    4. For each of the n calculated fibonacci numbers, rotate the letters of the password-appended-reversed-message by that number. Evenly indexed letters rotate forward (a -> b -> ... -> y -> z -> a), oddly indexed letters rotate backward (z -> y -> ... -> b -> a -> z).

    The goal is to write a function that reverses the above process to decode the message.

  • Default User Avatar

    Will this miss the case where the first letter of the sentence (uppercase) is also the first letter of the name (lowercase)?

  • Default User Avatar

    For some reason I thought I could pull the 0.5 out of log in the numerator. I got lucky that it passed the randomized tests. I redid it.

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    Agree with all of the comments. I eliminated the fullName field only to find out the tests verify its existence and public accessibility. Why?!

  • Default User Avatar

    In Java, the tests produce values that cannot fit in a long data type. Instead the test values are being truncated. Either (1) the tests should be limited to ensure that the output will not overflow or (2) the return type should be changed to something that can hold the output (e.g., String or BigInteger).

  • Default User Avatar

    In Java, the test parameters for the assert statements in the test cases are backward. This results in the "expected" and "actually was" statements being reversed. Also, the description should be more clear that the pontoon is between me and the shark. On my first attempt, I thought both the shark and I were on the same side of the pontoon racing toward it.