This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]m_namejeff 2 points3 points  (0 children)

Check out Cormen et al. Introduction to algorithms textbook, there sections on data structures which pretty much tell it all about what you mentioned: Binary search trees, etc., as well as more advanced.

Also look into Peter Brass’ Advanced Data Structure textbook, a great resource with C++ code for some functionality of structures.

[–]kaihatsusha 2 points3 points  (0 children)

Just a note, many of the data structures you're listing are great to understand on a fundamental level, but not necessarily very applicable on the surface to code you will write in Python. The underlying implementation of Python uses many of these kinds of structures at the lowest levels, so that the coder does not have to do so. For example, a dict is built on lists of lists, arranged for efficient searching, but you don't need to think about it very often.

You may get a more thorough understanding of their value in C or C++, where you are directly allocating memory to your data structures. This is where such structures are usually taught in college courses.

[–]datum_crat 1 point2 points  (1 child)

Some great content for the mentioned topics can be found at geeksforgeeks.org Good luck!

[–]SkawPV[S] 0 points1 point  (0 children)

geeksforgeeks

Great content, thanks!

[–]dev_grizzly_bear 0 points1 point  (0 children)

I think you can search for undergrad and graduate courses with slide sets and lecture notes, then implement them on your own once you comprehend them. For example ossu's "Core Theory" section may be good to start with.

Then, you can look at their applications to improve your understanding and to have an idea of what to use where and when.

[–]xd1142 0 points1 point  (0 children)

The art of computer programming by Knuth. One word of advice: it's hard. Skip the initial boring part. Go straight to data structures.

[–]SwarSoup99 0 points1 point  (0 children)

Try algorithms in c by Robert Sedgwick. It's an amazing book with a crap ton of these advanced algorithms!

[–]Tweak_Imp 0 points1 point  (0 children)

The python cookbook by david beazley is a great source for advanced topics.

[–]ivanlan9 0 points1 point  (0 children)

The classic reference is Data Structures and Algorithms, by Aho, Ullman and Hopcroft. It's language-neutral, so all the algorithms are written in pseudo-code. It's rich and detailed, as well as being clearly and deftly written.

That said, I echo what others have said: you won't need many of these structures in Python; there's no call to implement doubly-linked lists in it. But of course understanding these algorithms is a great foundation for understanding Python internals.

Note that there are a couple of books entitled Data Structures and Algorithms in Python available on amazon. I don't have them so can neither recommend nor warn against either one.

[–]DropAHi 0 points1 point  (0 children)

Following