Ad
  • Custom User Avatar

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

  • Custom User Avatar

    lol, Thanks :).
    From Wikipedia:
    "Informally, especially in computer science, the Big O notation often is permitted to be somewhat abused to describe an asymptotic tight bound where using Big Theta Θ notation might be more factually appropriate in a given context."

  • Custom User Avatar

    As far as I understand this solution is O(nm).
    Where n is the length of a and m is the length of b.
    It is not O(n^2), unless you're assuming a and b must be the same length?
    If a.length is 100 and b.length is 1, the number of comparisons is 100, not 10,000...

  • Custom User Avatar

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