+1 vote
in Data Structures & Algorithms I by (110k points)
The time complexity of the code that determines the number of inversions in an array using merge sort is lesser than that of the code that uses loops for the same purpose.

(a) true

(b) false

I want to ask this question from Arrays Types topic in section Arrays Types of Data Structures & Algorithms I

I had been asked this question in homework.

1 Answer

+1 vote
by (408k points)
selected by
 
Best answer
The correct choice is (a) true

The best explanation: The time complexity of the code that determines the number of inversions in an array using merge sort is O(n log n) which is lesser than the time complexity taken by the code that uses loops.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...