471,056 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,056 software developers and data experts.

Can somebody give me a python code for this?

Given an array of elements, look at it as a binary tree. Start at the last
interior node, and downheap it. Then downheap the previous interior node,
and continue in this fashion, up to the root.
Feb 7 '07 #1
5 1620
John a écrit :
Given an array of elements, look at it as a binary tree. Start at the last
interior node, and downheap it. Then downheap the previous interior node,
and continue in this fashion, up to the root.

http://www.catb.org/~esr/faqs/smart-....html#homework
Feb 7 '07 #2
hg
John wrote:
Given an array of elements, look at it as a binary tree. Start at the last
interior node, and downheap it. Then downheap the previous interior node,
and continue in this fashion, up to the root.
Your teacher ?

Feb 7 '07 #3
I solved it myself.
Don't bother.

"John" <ru**@jcmills.comwrote in message
news:eq***********@netnews.upenn.edu...
Given an array of elements, look at it as a binary tree. Start at the last
interior node, and downheap it. Then downheap the previous interior node,
and continue in this fashion, up to the root.

Feb 7 '07 #4
On 2007-02-07, John <ru**@jcmills.comwrote:
Given an array of elements, look at it as a binary tree. Start
at the last interior node, and downheap it. Then downheap the
previous interior node, and continue in this fashion, up to
the root.
I'll give you python code for that if you give me your degree
in the remotely possible case where you do graduate...

--
Grant Edwards grante Yow! Is this BOISE??
at
visi.com
Feb 7 '07 #5
John wrote:
I solved it myself.
Don't bother.
Heh heh, I don't think they were going to anyway.
Feb 7 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Patrick | last post: by
3 posts views Thread by John | last post: by
11 posts views Thread by yangsuli | last post: by
14 posts views Thread by cool.vimalsmail | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.