AmortizedAnalysis

4 multipop stack goal support operations on a set of

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: . Preflow-push. (f ) = height(v ) v : excess(v ) > 0 Red-black trees. w (x ) (T ) = xT w (x ) = 0 1 0 2 x x x x 28 A MORTIZED A NALYSIS ‣ binary counter ‣ multipop stack ‣ dynamic table SECTION 17.4 Multipop stack Goal. Support operations on a set of n elements: ・PUSH(S, x): push object x onto stack S. ・POP(S): remove and return the most-recently added object. ・MULTIPOP(S, k): remove the most-recently added k objects. MULTIPOP (S, k) ___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ FOR i = 1 TO k POP (S). _____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________...
View Full Document

This document was uploaded on 02/05/2014.

Ask a homework question - tutors are online