File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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?
Thanks!


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

Joined: Mar 01, 2009
Posts: 1699
    
  14

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
Author
Greenhorn

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.

Allen

All of my books are available from http://greenteapress.com
 
 
subject: Algorithms and Data Structures in Think Python