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

    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.