Some month ago, I have kindly received two books from Apress.com for a review. The first one was for Python Data Analytics, which I have already reviewed and the second once was Python Algorithms. Before starting the review, let me clarify where I stay in the position of Algorithms – I have been a student at an algorithm course in HackBulgaria with Python and I have read some chapters from Algorithm Design (Kleinberg & Trados) and The Algorithm Design (from Skiena). Furthermore, sometimes I take part in algorithmic competitions, but I am not amongst the top coders.
Having said all of this, let me start with the review:
Structure >The book is structured as probably any book or course for programming. Starting from the basics with the Asymptotic Notation and the complexity of algorithms and going to various structures and cases. After each chapter you have problems with hints for their resolution at the end of the book. Three appendices – way to speed up python, list of all algorithmic problems and graph terminology. I found them useful.
Positive points> As the book of Kleinberg and Trados, here the author really tries to tell a story about the algorithm and he manages it pretty well. Probably by experience he has realized that it is quite easy to “lose” the reader on the tough parts, thus there are some pictures and jokes. Definitely something that I liked.
Negative points (a.k.a. hate) > The only hate part I can think about is that the exercises are not completely resolved, but only hints are given for them. Anyway, for an average programmer having access to google and stackoverflow, it should not be difficult to solve those with the hints. But still, I prefer to know the authors ideas of how to solve those. The more code you see, the better you write your own.
Code Present > Yes. Totally. And that is great! 🙂 I would even allow myself to put a link to the code in the official page here. Something good about the code – whenever the code allows it, the author provides in a comment an example of what should be written in the shell to run the code. That is a good practise more authors should follow, so the readers are never confused:
>>> G = some_graph()
>>> list(iddfs(G, 0))
[0, 1, 2, 3, 4, 5, 6, 7]
Style of writing > A nice one. As readable as I could imagine. With jokes, trying to attract the attention to the subject. Telling the stories behind some of the famous algorithms is also part of the book – e.g. the thing with the Swedish towns and villages, the bridges of Kaliningrad. Even when there is no such story, the author creates one, which I liked.
The Verdict > If you know Python already to some good working level and you need to understand algorithms for a reason, the book would bring you there. If you do not know Python, learn it first and then go into this book. 🙂
Click here to access the book, on the Apress.com website.