270HW2 - Master Theorem, Amortization PDF

Title 270HW2 - Master Theorem, Amortization
Author Tommy Trojan
Course Introduction to Algorithms and Theory of Computing
Institution University of Southern California
Pages 2
File Size 271.5 KB
File Type PDF
Total Downloads 13
Total Views 164

Summary

Master Theorem, Amortization...


Description

T (n) = 2T ( n3 ) + n T (n) = T ( n3 ) + 1 T (n) = 2T (n − 1) + 1 T (n) = 16T ( n4 ) + n2 i

n 2

i

i 1

push(stackB, x)

stackA stackB x = pop(stackB ) push(stackA, x) stackA pop(stackA)

push() Enqueue()

pop()

O(1)

Dequeue()

A = [1, 2, 3, 6, 4, 5, 7] O(n log k)

0

2i

i

4 8

x i



2

3 x

0

0

• •

Θ(log2 n) Θ(n)...


Similar Free PDFs