Which one of the following statements about sorting and big-Oh is true? a. Selection sort can sort

Question:

Which one of the following statements about sorting and big-Oh is true?

a. Selection sort can sort an array of integers in O(N) time.

b. Merge sort achieves an O(N log N) runtime by dividing the array in half at each step and then recursively sorting and merging the halves back together.

c. Merge sort runs faster than selection sort because it is recursive, and recursion is faster than loops.

d. Selection sort runs in O(N) time if the array is already sorted to begin with, or O(N2) if it is not.

e. Sorting algorithms that rely on comparing elements can only be used with type int, because values from other types of data cannot be compared to each other.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: