Your SlideShare is downloading. ×
Insert 2 Merge
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Insert 2 Merge

83
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
83
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. insert 2 merge Yun-Yan Chi Dec 21, 2011
  • 2. • insertion sort 2 merge sort• two level nested condition • poslen • transposition!• for each direction (forward and backward) • 4 branches • totally, 8 branches
  • 3. 2 1 0?
  • 4. 3 2 10
  • 5. 2? 1 0
  • 6. 1’ ( ? 0’ )0
  • 7. 3 1 20
  • 8. forward
  • 9. if c1 then if c2 then b1 else b2 else if c2 then b3 else b4
  • 10. if c1 then if c2 then b1 else b2 else if c2 then b3 else b4
  • 11. if c2 then if c1 then b1 else b3 else if c1 then b2 else b4
  • 12. if c1 then if c2 then b1 else b2 else if c2’ then b3 else b4
  • 13. backward
  • 14. generalization!