ChatGPT gets buckbroken by a basic optimization problem and suggests a default function.

ChatGPT gets buckbroken by a basic optimization problem and suggests a default function.
Are YOU better than chatgpt, BOT?

ChatGPT Wizard Shirt $21.68

Beware Cat Shirt $21.68

ChatGPT Wizard Shirt $21.68

  1. 1 year ago
    Anonymous

    >>> 'reggin'[::-1]

  2. 1 year ago
    Anonymous

    frick off boomie i'm going to use the algorithims in the standard libarary. no i'm not going to write my own and no i'm not going to feel inferior for that. nobody cares about you CS prof larp, the std lib algos are faster than the textbook theory shit you vomit

    • 1 year ago
      Anonymous

      >CS
      It's over before it even began for you kek

  3. 1 year ago
    Anonymous

    if 'a', push back 'a'
    else, push back ch[no]

    ?

    • 1 year ago
      Anonymous

      Too slow, sorry. Imagine a string of million characters, do you unironically go through every single character just to see whether you need to change it to an a?

      • 1 year ago
        Anonymous

        Default to 'a'
        if a do nothing
        else insert ch[no]
        ?

        • 1 year ago
          Anonymous

          Hint: use statistics. You literally know that 9/10 times the character will be an "a", and you do nothing with this information.

          • 1 year ago
            Anonymous

            I'm guessing there's more to it than just stopping once you found 10% the string-length of non-a's, but just that should be faster most of times, right?

            • 1 year ago
              Anonymous

              If you know nothing about the distribution it really doesn’t help. I guess you could do something like after finding a non-a you skip the next 5% of the string, but you’ll likely miss one and have to repeat the process anyways.

              Hint 2: work with the assumption that there's only one a in a gigantic string that you need to reverse. Now extrapolate it to 2 A's, 10 A's, 1% A's and so on...

              • 1 year ago
                Anonymous

                does it matter? you can put the length of several strings together and calculate 10% of that as well, or just make it a loop. But why would you look at the A's rather than the rest? length-check is included in reversed() so there's no reason to not use it rather than counting A's, or is that part of what is poorly optimized about it?

          • 1 year ago
            Anonymous

            If you know nothing about the distribution it really doesn’t help. I guess you could do something like after finding a non-a you skip the next 5% of the string, but you’ll likely miss one and have to repeat the process anyways.

      • 1 year ago
        Anonymous

        Hint: use statistics. You literally know that 9/10 times the character will be an "a", and you do nothing with this information.

        [...]
        Hint 2: work with the assumption that there's only one a in a gigantic string that you need to reverse. Now extrapolate it to 2 A's, 10 A's, 1% A's and so on...

        Nice troll. The output complexity is linear. You will have a hard time going faster.

  4. 1 year ago
    Anonymous

    >Are YOU better
    I don't think so, because what I'd do is load, vpshufb, store. Assuming non-Unicode, anyway. I don't see how you could be faster than that regardless of what the string contains. What did you have in mind?

  5. 1 year ago
    Anonymous

    >561 KB
    WTF is wrong with you? KYS.

  6. 1 year ago
    Anonymous

    All you need is a mirror.

  7. 1 year ago
    Anonymous

    ?t=175

    And the people bowed and prayed
    To the neon god they made
    And the sign flashed out its warning
    In the words that it was forming
    And the sign said, "The words of the prophets are written on the subway walls and tenement halls
    And whispered in the sound of silence"

    The word of the prophets are the schizos

    • 1 year ago
      Anonymous

      the sign = the profile pic

      >He will not shout or cry out, or raise his voice in the streets. A bruised reed he will not break, and a smoldering wick he will not snuff out. In faithfulness he will bring forth justice;

  8. 1 year ago
    Anonymous

Leave a Reply to Anonymous Cancel reply

Your email address will not be published. Required fields are marked *