227k views
0 votes
In considering a sorting problem, how important is it to you that some of the data is likely to be ordered?

User Mayeul Sgc
by
5.2k points

1 Answer

7 votes

Answer:

It depends on the size of the data structure and the algorithm used, if the data structure is small, then an ordered data is not relevant considering the choice of speed.

Step-by-step explanation:

There are various data structures and algorithms. The time taken to iterate through a small unordered list or array data is relevant (a linear sort of O(n) would not be harmful), but as the size increases, the execution time increases.

So, for larger data structures, an ordered data and a more time-efficient algorithm is adopted.

User VRK
by
4.9k points