I am beginner who thought before doing the String Methods section of the course “You know what, let’s test my skills”. And boy my skills were tested. After I completed the challenge my jaw dropped, with the solution.

Had/Have this happened to y’all. Where you make something complicated and found out that there was a simple solution?

Solution

My Code

  • drspod
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    O(N^2) - with every new character in the string its speed decreases exponentially,

    Try to be precise when teaching others. O(N^2) increases “quadratically” not exponentially. O(k^N) would be exponentially increasing with N.