posted 11 years ago
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