(18) Sorting (Sina)

(18) Sorting (Sina) - Sorting Sina Meraji Fall 2009 Sorting...

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

View Full Document Right Arrow Icon
Sorting Sina Meraji Fall 2009
Background image of page 1

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

View Full DocumentRight Arrow Icon
Sorting ± Sorting is one the most common tasks given to computers ± Much work has been done on developing efficient sorting techniques ± We have seen one method and now we consider some others
Background image of page 2
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 6 5 1 4 9 8
Background image of page 3

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

View Full DocumentRight Arrow Icon
uickTime™ and a decompressor ed to see this picture. 6 5 1 4 9 8 Select the first number Remember Bubble Sort?
Background image of page 4
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 6 5 1 4 9 8 Compare it with the next number
Background image of page 5

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

View Full DocumentRight Arrow Icon
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 5 6 1 4 9 8 If greater, swap them, if not leave it there and select the next number
Background image of page 6
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 5 6 1 4 9 8 Continue until you reach the end
Background image of page 7

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

View Full DocumentRight Arrow Icon
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 5 1 6 4 9 8 Continue until you reach the end
Background image of page 8
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 51 6 4 9 8 Continue until you reach the end
Background image of page 9

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

View Full DocumentRight Arrow Icon
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 514 6 9 8 Continue until you reach the end
Background image of page 10
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 5146 9 8 Continue until you reach the end
Background image of page 11

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

View Full DocumentRight Arrow Icon
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 5 1 4 6 8 9 At the end of the first pass, the largest number is positioned at the end
Background image of page 12
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 5 1 4 6 8 9 Now it is time to find the second largest number
Background image of page 13

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

View Full DocumentRight Arrow Icon
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 5 1 4 6 8 9 Now it is time to find the second largest number
Background image of page 14
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 1 5 4 6 8 9 Now it is time to find the second largest number
Background image of page 15

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

View Full DocumentRight Arrow Icon
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 1 5 4 6 8 9 Now it is time to find the second largest number
Background image of page 16
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture. 1 4 5 6 8 9 Now it is time to find the second largest number
Background image of page 17

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

View Full DocumentRight Arrow Icon
Remember Bubble Sort? uickTime™ and a decompressor ed to see this picture.
Background image of page 18
Image of page 19
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 88

(18) Sorting (Sina) - Sorting Sina Meraji Fall 2009 Sorting...

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

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