+ All Categories
Transcript
Page 1: Counting Inversions I

Divide and ConquerCounting Inversions I

Design and Analysis of Algorithms I

Page 2: Counting Inversions I

Tim Roughgarden

The Problem

Page 3: Counting Inversions I

Tim Roughgarden

Examples and Motivation

Page 4: Counting Inversions I

15

21

3664

What is the largest-possible number of inversions that a 6-element array can have?

Page 5: Counting Inversions I

Tim Roughgarden

High-Level Approach

Page 6: Counting Inversions I

Tim Roughgarden

High-Level Algorithm


Top Related