+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 self balancing BST is lesser than that of the code that uses loops for the same purpose.

(a) true

(b) false

My enquiry is from Arrays Types in division Arrays Types of Data Structures & Algorithms I

This question was posed to me during an online interview.

1 Answer

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

The explanation is: The time complexity of the code that determines the number of inversions in an array using self balancing BST 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

...