You are on page 1of 8

Introduction

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

Running Time of Merge Sort

Tim Roughgarden

Proof of claim (assuming n = power of 2):

Tim Roughgarden

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

Proof of claim (assuming n = power of 2):

Tim Roughgarden

2j and 2j, respectively.

Tim Roughgarden

Running Time of Merge Sort

Tim Roughgarden

You might also like