title: What is the complexity evaluation of O(m * n) + O((m + n) * log(m + n))
body: <p>I have following Python code, a and b are lists(I know it isn't best way of getting intersections):</p>
  <pre><code>def get_intersection(a, b):
      a = set(a)
      b = set(b)
      c = sorted(list(a&amp;b))
      return c
  </code></pre>
  <p>Let's call len(a) - m and len(b) - n, where is no additional information about a and b. Then time complexity of given code is O(m) + O(n) + O(m * n) + O((m + n) * log(m + n)). <br><br></p>
  <p>I definitely can shorten O(m) and O(n), because they are much less than O(m * n), but what should I do with O((m + n) * log(m + n))? <br><br>
  How do i compare O(m * n) and O((m + n) * log(m + n))? Should I keep O((m + n) * log(m + n)) in final evaluation?</p>