HW3 - 40 60 80 75 90 70 75 3 rd 60 80 75 90 75 70 35 40 60...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Name : Rohit S Deshmukh Person # 35628926 Recitation : A4 Monday 3:00 to 3:50 PM Page 577 Self Check Problem #1 The passes needed are (n-1) that is 7 Passes There are 5 exchanges that take place. Below mentioned is the array after each pass : 40 35 80 75 60 90 70 75 35 40 80 75 60 90 70 75 35 40 60 75 80 90 70 75 35 40 60 70 80 90 75 75 35 40 60 70 75 90 80 75 35 40 60 70 75 75 80 90 Pg 580 Self Check Problem # 1 1 st Pass 40 35 80 75 60 90 70 75 35 40 80 75 60 90 70 75
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
35 40 80 75 60 90 70 75 35 40 75 80 60 90 70 75 35 40 75 60 80 90 70 75 35 40 75 60 80 90 70 75 35 40 75 60 80 70 90 75 35 40 75 60 80 70 75 90 35 40 75 60 80 70 75 90 2 nd Pass 35 40 75 60 80 70 75 90 35 40 60 75 80 70 75 90 35 40 60 75 80 70 75 90 35 40 60 75 70 80 75 90 35 40 60 75 70 75 80 90 35 40 60 75 70 75 80 90
Background image of page 2
3 rd pass 35 40 60 75 70 75 80 90 35 40 60 75 70 75 80 90 35 40 60 75 70 75 80 90 35 40 60 75 70 75 80 90 35 40 60 70 75 75 80 90 35 40 60 70 75 75 80 90 35 40 60 70 75 75 80 90 35 40 60 70 75 75 80 90 The array is sorted with 3 Passes 9 exchanges and 11 Comparisons Pg 586 Self Check Problem # 1 1 st Pass 40 80 75 60 90 70 75 35 40 80 75 60 90 70 75 35
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
35 40 80 75 60 90 70 75 2 nd pass 35 40 80 75 90 70 75 60 35 40 80 75 90 70 75 60 35 40 80 75 90 70 75 60 35
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 6
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 40 60 80 75 90 70 75 3 rd Pass 35 40 60 80 75 90 75 70 35 40 60 80 75 90 75 70 35 40 60 80 75 90 75 70 35 40 60 80 75 90 75 70 35 40 60 70 80 75 90 75 4 th pass 35 40 60 70 80 90 75 75 35 40 60 70 80 90 75 75 35 40 60 70 75 80 90 75 5 th pass 35 40 60 70 75 80 90 75 35 40 60 70 75 80 90 75 35 40 60 70 75 75 80 90 75 35 40 60 70 75 75 80 90 The array is sorted using insertion sort after 5 passes and 8 exchanges Pg 598 Self Check Problem # 1 Merge sort Tracing the execution of merge sort . 55 50 10 40 80 90 60 100 70 80 20 55 50 10 40 80 55 50 50 55 10 40 80 10 40 50 55 80 90 60 100 70 80 20 90 60 100 90 60 60 90 60 90 100 70 80 20 70 80 20 70 80 20 60 70 80 90 100 10 20 40 50 55 60 70 80 80 90 100...
View Full Document

{[ snackBarMessage ]}

Page1 / 7

HW3 - 40 60 80 75 90 70 75 3 rd 60 80 75 90 75 70 35 40 60...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online