+1 vote
in Data Structures & Algorithms I by (110k points)
What is the speciality of cartesian sorting?

(a) it sorts partially sorted set of data quickly

(b) it considers cartesian product of elements

(c) it sorts elements in less than O(logn)

(d) it is a self balancing tree

I'd like to ask this question from Cartesian Tree in portion Binary Trees of Data Structures & Algorithms I

This question was addressed to me in exam.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
Right choice is (a) it sorts partially sorted set of data quickly

The explanation is: It can sort a set which requires only some sorting or displacements. for example consider 78, 79, 80, 82, 81, 83, In this only 81 and 82 must be swaped to make it a complete sorted set, in this case cartesian sort comes to the rescue.

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.