Ad
  • Default User Avatar

    I understand. I better check some books on efficient Python as my Python only brought me to 5 kyu. It seems like anything
    above that will require different thinking.

  • Default User Avatar

    The description doesn't say how many numbers the
    list should consist of. As it is it could be infinite.

  • Default User Avatar

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

  • Default User Avatar

    The test is parsing an array [ 6, 0, 1, 10, 10 ] and it expects to get returned 17. 10 is undoubtedly the hightest
    number there so my code removes both instances and the test won't pass.

  • Default User Avatar

    It should be noted in the description of the challenge that the tests check for
    order of the your words in the list. I've got a solution but need to redo it
    because I've got the words in different order and it won't pass some of the tests.

    Either make a note in the description saying the resulting list needs to be
    in specified order or make the test order-insensitive.

  • Default User Avatar

    This is funny. So how one supposed to come up with number of trailing zeros of a number if you can't have the number to begin with ? Duh ! Leaving this one.

  • 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 is not the first time when my code won't pass due to time out:

    def is_it_there(ch, arr):
        counter = 0
        for x in arr:
            if ch.upper() in x or ch.lower() in x:
                counter += 1
        return counter
    
    def find_uniq(arr):
        
        for word in arr:
            for char in word:
                if is_it_there(char, arr) == 1:
                    return word
    
  • Default User Avatar

    For those of you who are complaining about description not being clear enough. Fellow
    coders you need to understand that if the description would be crystal clear all
    coders would know exactly what's the required output and how to go about solving
    it and hence it wouldn't qualify for 5 kyu rank. They would have to rank it down.
    By not making the description crystal clear they're effectively making it harder
    to work out 'coz you've got questions floating around your head ("do they mean this, or do they mean that..."
    hence they can rank it up.

  • Default User Avatar

    I'm with you on this one. The instructions clearly say we need to return the first two values from the left that add up to "s" and
    it rejects 5 and 5 as a correct answer. As much as I respect this platform it's not flawless and you need to take
    it that way.

  • Default User Avatar

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

  • Default User Avatar

    I'd suggest to reword "jump" in the instructions to "iterate back / iterate to" because I just created solution that jumps (skips)
    the steps in between making it an infinite loop in result because when you jump back from [jnz c -5] to [dec a] and then back to [jnz c -5] you're effectively skipping the only step that can let the program proceed [dec c]. So now I need to change my solution so it iterates back and forth so the program can actualy find its end.

  • Default User Avatar

    I completely missed the fact that I'm supposed to double the names !
    Oh .. gosh ... I'm giving you permission to make fun of me for
    the rest of the day. Now I know what to do!

  • Default User Avatar

    This is not a working solution so please don't freak out.
    I'm sharing it here because I like this block of code. It's only
    few lines and very elegant if I may say. Strangely though, it
    doesn't work. It doesn't return the word you're after. Theoritically speaking, it
    should.

    from collections import deque

    def who_is_next(names, r):
    #print(names, r)
    r -= 1 # here I'm accounting for the fact that you need to decrease number
    # of rotations by 1 in order to get the word you're after.
    d = deque(names)
    d.rotate(-r)
    return d[0]

  • Loading more items...