I am trying to figure out what is the total Big-O complexity of a problem with multiple variables and different mathematical functions.
The two big steps in the problem takes O(n*m) and O(n*logn). Both n and m are independent and can be very big or very small.
What is the correct complexity? Is it O(n*m)? O(n*logn)? Or O(n*m+n*logn)?