Consider the following array: int[] numbers = {29, 17, 3, 94, 46, 8, 4, 12}; After a

Question:

Consider the following array:

int[] numbers = {29, 17, 3, 94, 46, 8, –4, 12};

After a single pass of the selection sort algorithm (a single swap), what would be the state of the array?

a. {–4, 29, 17, 3, 94, 46, 8, 12}

b. {29, 17, 3, 94, 46, 8, 12}

c. {–4, 29, 17, 3, 94, 46, 8, –4, 12}

d. {–4, 17, 3, 94, 46, 8, 29, 12}

e. {3, 17, 29, 94, –4, 8, 46, 12}

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

Step by Step Answer:

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