Tuesday, 10 September 2013

Dominant term in time complexity

Dominant term in time complexity

If an algorithm has time complexity O(n+m), and we know that m >= n (e.g.,
we're traversing a connected graph with n nodes and m edges). Then I think
the following is true:
O(n+m) = O(m)
O(n log n + m) cannot by simplified
Is this correct?

No comments:

Post a Comment