Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tim Roughgarden Introduction Merge Sort (Analysis ) Design and Analysis of Algorithms I.

Similar presentations


Presentation on theme: "Tim Roughgarden Introduction Merge Sort (Analysis ) Design and Analysis of Algorithms I."— Presentation transcript:

1 Tim Roughgarden Introduction Merge Sort (Analysis ) Design and Analysis of Algorithms I

2 Tim Roughgarden Running Time of Merge Sort

3 Tim Roughgarden Proof of claim (assuming n = power of 2):

4 Template vertLeftWhite2 A constant number (independent of n). Roughly how many levels does this recursion tree have (as a function of n, the length of the input array)?

5 Tim Roughgarden Proof of claim (assuming n = power of 2):

6 Template vertLeftWhite2 2 j and 2 j, respectively.

7 Tim Roughgarden

8 Running Time of Merge Sort


Download ppt "Tim Roughgarden Introduction Merge Sort (Analysis ) Design and Analysis of Algorithms I."

Similar presentations


Ads by Google