Why do these functions have different time complexities?

前端 未结 0 1880
梦如初夏
梦如初夏 2021-02-05 14:19

I know the mergeSort function takes O(logn) and merge function takes O(n) and therefore total complexity is O(nlogn).

void mergeSort(int arr[], int l, int r){
            


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题