facetiously Initial array, of length n = 11 f ac etio usly (Spacing the levels for ease of seeing the binary tree) bubbledown(5), since n/2 = 5 f ac eyio uslt bubbledown(4) f ac uyio eslt bubbledown(3) f ao uyic eslt bubbledown(2) f yo uaic eslt bubbledown(5), called recursively f yo utic esla bubbledown(1) y fo utic esla bubbledown(2), called recursively y uo ftic esla bubbledown(4), called recursively y uo stic efla heap order has now been achieved swap a uo stic efl|y last item in correct place bubbledown(1) u ao stic efl|y bubbledown(2), called recursively u to saic efl|y bubbledown(5), called recursively u to slic efa|y heap order restored in left 10 places swap a to slic ef|uy last 2 items in correct place bubbledown(1) t ao slic ef|uy bubbledown(2), called recursively t so alic ef|uy bubbledown(4), called recursively t so flic ea|uy heap order restored in left 9 places swap a so flic e|tuy last 3 items in correct place bubbledown(1) s ao flic e|tuy bubbledown(2), called recursively s lo faic e|tuy heap order restored in left 8 places swap e lo faic |stuy last 4 items in correct place bubbledown(1) o le faic |stuy bubbledown(3), called recursively o li faec |stuy heap order restored in left 7 places swap c li fae |ostuy last 5 items in correct place bubbledown(1) l ci fae |ostuy bubbledown(2), called recursively l fi cae |ostuy heap order restored in left 6 places swap e fi ca |lostuy last 6 items in correct place bubbledown(1) i fe ca |lostuy heap order restored in left 5 places swap a fe c |ilostuy last 7 items in correct place bubbledown(1) f ae c |ilostuy bubbledown(2), called recursively f ce a |ilostuy heap order restored in left 4 places swap a ce |filostuy last 8 items in correct place bubbledown(1) e ca |filostuy heap order restored in left 3 places swap a c |efilostuy last 9 items in correct place bubbledown(1) c a |efilostuy heap order restored in left 2 places swap a |cefilostuy last 10 items in correct place |acefilostuy sorted