• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

2016 MC Q13 (1 Viewer)

GraPeOwO

New Member
Joined
Aug 19, 2020
Messages
29
Gender
Male
HSC
2020
Uhhhh so here's the question
1599616319575.png

The answer is C but I don't understand - if you use selection with ascending order you either get the lowest number on the left after one pass or the highest number on the right after one pass. So if you did the first way the array would be 043872 and if you did the second way the array would be 403728 (D). I thought the answer would be C after two passes (since the 7 moves to the next highest point behind 8). helppppp meeeee :`(
 

cossine

Well-Known Member
Joined
Jul 24, 2020
Messages
626
Gender
Male
HSC
2017
If by, pass you mean swap then C requires only one swap, not two. Take a look at the original array. D, on the other hand, requires 2 swaps.
 

GraPeOwO

New Member
Joined
Aug 19, 2020
Messages
29
Gender
Male
HSC
2020
If by, pass you mean swap then C requires only one swap, not two. Take a look at the original array. D, on the other hand, requires 2 swaps.
Right yeah I’m just being dumb thanks
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top