# 3) Given the following initial elements in a list of datat z u y

Content type
User Generated
Rating
Showing Page:
1/2
3) Given the following initial elements in a list of data:
t z u y r a l w s i
Show their order after the first 3 iterations of selection sort
(non-decreasing).
How many comparisons were performed to reach this
state?
How many data movements needed to be done (or linkage
movements if the list was linked)?
10) A set of data is initially:
a b d r u c y m
2 3 1 2 4 2 1 4
After sorting based on the numeric values, the data looks
like this:
y d a r c b u m
1 1 2 2 2 3 4 4
Was the sort used stable?
If not, circle the parts of the data that give it away.
What sort(s) do we now know could not have been used?
Solution
3.
a i l y r t u w s z
30 comparisons were made as in each step it checks all
the elements.
Considering a swap as a data movement total 3 were

Showing Page:
2/2

Unformatted Attachment Preview
3) Given the following initial elements in a list of data: t z u y r a l w s i Show their order after the first 3 iterations of selection sort (non-decreasing). How many comparisons were performed to reach this state? How many data movements needed to be done (or linkage movements if the list was linked)? 10) A set of data is initially: a b d r u c y m 2 3 1 2 4 2 1 4 After sorting based on the numeric values, the data looks like this: y d a r c b u m 1 1 2 2 2 3 4 4 Was the sort used stable? If not, circle the parts of the data that give it away. What sort(s) do we now know could not have bee ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

### Review

Anonymous
Super useful! Studypool never disappoints.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4