## Overall complexity with multiple operations?

Question

If I have an unsorted array and if I first sort it by using quick sort with a run time of O(nlgn) and then search for an element using Binary search, with a run time of O(lgn) then what would be the over all run time of both these operations? Would that individual run times be added?

Show source

## Answers ( 1 )

It will be O(n logn) because O(n logn + logn) = O(n logn) So yes, you sum it, but in this case it doesn't matter