• + 0 comments

    m <= n, so O(nm) is technically O(n^2) too, but O(nm) is a tighter upper bound.