File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Jython/Python and the fly likes Algorithms and Data Structures in Think Python Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "Algorithms and Data Structures in Think Python" Watch "Algorithms and Data Structures in Think Python" New topic

Algorithms and Data Structures in Think Python

Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Im looking to learn Data Structures and their implementation . Does Think Python provide any sort of insight into them?

Learning and Learning!-- Java all the way!
chris webster

Joined: Mar 01, 2009
Posts: 2290

You might be interested in "Python Algorithms" by Magnus Lie Hetland. It doesn't cover data structures.

No more Blub for me, thank you, Vicar.
Allen Downey

Joined: Sep 07, 2012
Posts: 25

Teaching data structures and algorithms in Python is funny, because most standard data structures are either built into the language or available in libraries. So it's hard to motivate students to reimplement them.

On the other hand, Python is an excellent language for implementing algorithms: if you take the pseudocode from a book like Cormen, Leiserson and Rivest, you can usually translate it into Python with very little effort.

In Think Python Appendix B I cover basic analysis of algorithms, and as an example, I write an implementation of a hash table in Python. On one hand, that's a silly thing to do, because Python dictionaries are hashtables. On the other hand, the code is short and readable and (I think) makes it easy to understand how/why hashtables work.


All of my books are available from
I agree. Here's the link:
subject: Algorithms and Data Structures in Think Python
It's not a secret anymore!