prims algorithm

Terry Reedy tjreedy at home.com
Sun Nov 11 02:24:51 EST 2001


<christy_girl99 at yahoo.com> wrote in message
news:mailman.1005458834.15555.python-list at python.org...
> Can anyone show me how to do Prims algorithm in python? I'm supposed
> to find a minimum spanning tree of a weighted undirected graph using
> Prims algorithm.

You're 'supposed to'?  As in class assignment?

> I can do it in C++, but Python is giving me major  problems.
> I'm just learning this language and its pretty nuts, compared to
C/C++.

To me, Python seemed (and seems now) pretty same compared to C++ 8-).
What C++ construct are you having problem with translating or
re-expressing in Python?
A specific problem may get a specific hint.

Terry J. Reedy






More information about the Python-list mailing list