Ad
  • Custom User Avatar

    I'm sorry I don't understand what you are both saying, about nearing to the "nearest even integer" (it's probably because of my lack of mathematical knowledge).

    In Python, as far as I know, if you try to round let's say 4.6, it will give you 5, which is the "nearest integer" (not even), just like it's specified in the statement.

    What am I missing?

  • Custom User Avatar

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

  • Custom User Avatar

    In the description, you wrote:

    • The reinforces strings consist of only small letters.

    Although, as we can see in the examples, it can also include digits.

    Also, "reinforces" is a verb only. The correct noun is "reinforcements".

  • Custom User Avatar

    Returning 0, as per stated in the description, involves 2 conditions:

    • being a valid sequence (numerical values only)
    • having NO missing numbers

    As I said before, an empty sequence is either considered:

    • valid AND missing some numbers (starting with 1) -> so it should return the missing number
      OR
    • not valid (having no numerical values at all) -> so it should return 1

    An empty sequence doesn't satisfy both conditions for returning 0.
    And 1 is the missing number because as stated in the descritpion:
    "Check if the elements are part of an ascending sequence of integers starting with 1".

  • Custom User Avatar

    an empty sequence is valid but missing 1
    In both cases, the return value should be 1, not 0.

    If the sequence is valid, the return value should be 0, not some missing value:

    "1 2 3 4" -> 0  (not 5)
    "1"       -> 0  (not 2)
    ""        -> 0  (not 1)
    
  • Custom User Avatar

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

  • Custom User Avatar

    The description states:

    if the bit is 1, swap the case; if its 0, leave it as is.

    And:

    When you finish with the last bit of n, start again with the first bit.

    What is inconsistent here?

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    I agree about the bullet points layout.

    In the example you gave though, "a white space" is one thing, "number of error for that letter in a field of 6" is another thing.

    Maybe this would be clearer: "the number of errors as a left justified string of 6 characters long".

    The white space is usually the default filling character in an aligned string (center, left or right).

  • Custom User Avatar

    In Python, the description asks for an array as output. The examples show arrays as output. And yet the tests expect a tuple.

  • Custom User Avatar

    You're right ! Somehow I saw the first note but not the last one...

  • Custom User Avatar

    It is actually still the indices, it's just that it's 1-based indexing instead of 0-based.

    I agree with you though, it should be clearer - like at least mention that it's 1-based.

  • Custom User Avatar

    The description states:

    Note: m, n, f, b, c are positive integers, where 0 <= m <= n or m >= n >= 0. m and n are inclusive.

  • Loading more items...