[Tutor] "Path tree"

Abdur-Rahmaan Janhangeer arj.python at gmail.com
Wed Aug 16 23:22:08 EDT 2017


in addition to the answers i'd say now you have the motivation to learn
python data structures and algorithms

http://interactivepython.org/runestone/static/pythonds/index.html

barnum and miller

it is free though i have not found a good pdf book form from where to
download, but you have the site anyway !

Now, the website has more materials than when i first knew it.

hope it helps !

Abdur-Rahmaan Janhangeer,
Mauritius
abdurrahmaanjanhangeer.wordpress.com

On 14 Aug 2017 02:28, "Michael C" <mysecretrobotfactory at gmail.com> wrote:

Hi all:

I am trying to formulate a "path-finding" function, and I am stuck on this
problem:

Please look at the picture attached: Those dots are coordinates of (x,y),
and this tree can be thought of as a list of tuples, with each tuple
consisting of (x,y).  Now I am trying to make a function go through this
list of tuples and then return the "path." to go from, say, 4 to 8. If I
simply compute for the dot for shortest distance, then the solution would
be to go from 4 to 8 direct, but that doesn't work, because the correct
solution should have been 4,3,2,5,6,8.


How do I do this?

Thanks!
_______________________________________________
Tutor maillist  -  Tutor at python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


More information about the Tutor mailing list