Ad
  • Custom User Avatar

    It depends on what you're working on. If this function were part of a website backend counting characters in usernames or something, it doesn't really matter at all. But if this is a helper function that is responsible for comparing billions of base pairs in genetic sequencing or part of a stock trading platform where microseconds matter, then you need to rethink it.

  • Custom User Avatar

    Would it matter? I assume itll be a O(2n) vs O(n) but I'm not sure if that's a big deal.

  • Custom User Avatar

    I appreciate every reply to this comment.

    I have just two questions:

    What do you think about this solution? I think it isn't good; I did this in almost two days with a lot of breaks.

    I was searching on the internet and didn't find any explanation about the behavior when we are talking about Golomb sequences with zeros. Does anyone know why the sequence behaves like that when we use zeros?

  • Custom User Avatar

    I understand that they want to use preloaded variables, but I believe that as programmers, and as individuals inspecting new code, it's important to provide a clear understanding of the code's capabilities. It's crucial to avoid creating a "black box" effect regarding the constraints of the problem. Clearly stating these constraints helps in understanding the full context and ensures that the code is transparent and easier to work with.

  • Custom User Avatar

    There should no need to put the alphabet in the description, because the alphabet is made available to you as a preloaded variable. Just use the variable, instead of typing in all the alphabet, or copy/pasting it from description.

  • Custom User Avatar

    true this is a good case of bad pratices the code should be/try to be easy to read to any person new to the code

  • Custom User Avatar

    BRO JUST PUT THE ALPHATBET IN THE DESCRIPTION IS JUST PAINFULL BEING STUCKED IN A CHALENGE BECOUSE LACK OF INFORMATION ABOUT THE CONSTRAINS

  • Custom User Avatar

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