What is the speciality of cartesian sorting?

Kim Thu Đoàn

New member
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
 
Answer: A
Explanation: 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.
 

Tìm kiếm

Back
Top