( b) Below is an array of seven integers: 25 17 23 48 8 55 35 (i) Sort the integers using Quick Sort in ascending order.
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
( b) Below is an array of seven integers: 25 17 23 48 8 55 35 (i) Sort the integers using Quick Sort in ascending order.
( b) Below is an array of seven integers: 25 17 23 48 8 55 35 (i) Sort the integers using Quick Sort in ascending order. The first partition of the list is shown in Figure 1.0. The pivot value is in the box that is shaded. Redraw Figure 1.0 and fill in the value for the boxes with X and fill in the index value in each step. (9 marks) 25 17 23 8 55 35 X X X X X X X X X X X X index = 0 index = ? index = ? index = ? index = ? index = ? X X X X X X X X X X X X X X x X x X x X x X X x index = ? X X X x X X index = ? Figure 1.0 (ii) What is the worst case time complexity for Quick sort in () notation? (2 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!