AmortizedAnalysis

Else return false

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: URN false. _______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ 5 Appetizer Theorem. A[i] is initialized iff both 1 ≤ B[i] ≤ k and C[B[i]] = i. Pf. ⇒ ・Suppose A[i] is the jth entry to be initialized. ・Then C[j] = i and B[i] = j. ・Thus, C[B[i]] = i. 1 2 3 4 5 6 7 8 A[ ] ? 22 55 99 ? 33 ? ? B[ ] ?...
View Full Document

Ask a homework question - tutors are online