Programming Books C Java PHP Python Learn more Browse Programming Books
Python Algorithms: Mastering Basic Algorithms in the Pyth... and over one million other books are available for Amazon Kindle. Learn more
Buy New
$46.29
Qty:1
  • List Price: $54.99
  • Save: $8.70 (16%)
In Stock.
Ships from and sold by Amazon.com.
Gift-wrap available.
Python Algorithms: Master... has been added to your Cart
Sell yours for a Gift Card
We'll buy it for $18.55
Learn More
Trade in now
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

Python Algorithms: Mastering Basic Algorithms in the Python Language (Expert's Voice in Open Source) Paperback – November 24, 2010

ISBN-13: 978-1430232377 ISBN-10: 1430232374 Edition: 2010th

Buy New
Price: $46.29
28 New from $39.91 15 Used from $43.18
Amazon Price New from Used from
Kindle
"Please retry"
Paperback, November 24, 2010
$46.29
$39.91 $43.18
Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student


Frequently Bought Together

Python Algorithms: Mastering Basic Algorithms in the Python Language (Expert's Voice in Open Source) + Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython
Price for both: $71.53

Buy the selected items together

NO_CONTENT_IN_FEATURE

Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Series: Expert's Voice in Open Source
  • Paperback: 336 pages
  • Publisher: Apress; 2010 edition (November 24, 2010)
  • Language: English
  • ISBN-10: 1430232374
  • ISBN-13: 978-1430232377
  • Product Dimensions: 8.5 x 0.8 x 10.2 inches
  • Shipping Weight: 1.9 pounds (View shipping rates and policies)
  • Average Customer Review: 3.6 out of 5 stars  See all reviews (11 customer reviews)
  • Amazon Best Sellers Rank: #220,303 in Books (See Top 100 in Books)

Editorial Reviews

About the Author

Magnus Lie Hetland is an experienced Python programmer, having used the language since the late 1990s. He is also an associate professor of algorithms at the Norwegian University of Science and Technology, having taught algorithms for the better part of a decade. Hetland is the author of Practical Python and Beginning Python, first and second editions, as well as several scientific papers.

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

All in all, if you are a Python programmer interested in algorithms, this book is for you.
K. Noagbodji
I found the book very thoughtfully written with good anecdotal references and applications of similar types of algorithms to different problems.
Sumit Pal
The book certainly doesn't neglect these, but if there's one clear downside (for this reader) it is this: too much English, too few symbols.
Ian Zimmerman

Most Helpful Customer Reviews

31 of 32 people found the following review helpful By Robert Hancock on December 13, 2010
Format: Paperback Verified Purchase
Pros:
- Very clear explanation of a complex subject.
- Each chapter builds upon the previous chapters so that this is more like a class than a reference manual.
- More approachable that the Sedgewick and Cormen.

Cons:
- The almost constant parenthetical phrases distract from the text and quickly become irritating. After page 20 I just skipped them and found that I understood the concepts more quickly.
- The use of single letter variables in the code examples makes it more difficult to understand the structure of a new concept. When there are several of them, it can become confusing. (See page 207.) Why not just use descriptive variable names?

There are sections that make note of how to implement certain algorithms using Python specific features, and this is very helpful, but this is first and foremost a book on algorithmic theory that happens to use Python for code examples.
2 Comments Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
9 of 10 people found the following review helpful By Mike on January 5, 2011
Format: Paperback
I found Python Algorithms not only extremely helpful but an enjoyable read as well, not an easy task for an algorithm book. The text is conversational and well-organized, with numerous side notes that allow the reader to make insightful connections. The author's use of humor is not overwhelming, nor is it so sparse as to confuse novice readers to his intent. His use of sidebars can bog down the topics at times, but this has the advantage of making this text appropriate for readers of all skill levels.

The author also takes great pains to explain Python code within the book, which not only models well-written code to the reader but also takes advantage of eliminating pseudo-code with concrete examples of the Python language. The use of citations and notes on external sources within the book made it possible for me to independently research topics on the web. For more hands-on learners, there are exercises at the end of each chapter. This text could easily be the basis for a college-level class on Python and algorithm theory/development. All in all, a great text and a must-have for the Python programmer!
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
15 of 19 people found the following review helpful By Ian Zimmerman on March 24, 2011
Format: Paperback
This book presents a quite broad range of fundamental computer science
algorithms, with all illustrative code written in Python. There is a
strong emphasis on graph algorithms, perhaps reflecting a predilection
of the author. Since I like graphs too I cannot complain about that.

Beyond the actual implementations, the book aims for extra Python
relevance by including asides on Python internals (CPython, to be
precise). I was pleasantly surprised by the ones included, as they go
beyond the trivial. Given the prevalence of graph algorithms heaps (or
priority queues) had to play a central role, and the aside on Python's
heapq module is perhaps the most important of them. I wish there were
more of the Pythonic asides, though.

Even so, the book makes clear how Python's carefully balanced design
enables beautiful, concise implementations. There is almost no low
level busy-work code, the algorithms practically read themselves. And
they are commented too just in case you find a piece difficult to
understand.

There's more to algorithms then the implementations, though: one has to
address correctness proofs and efficiency properties. The book
certainly doesn't neglect these, but if there's one clear downside (for
this reader) it is this: too much English, too few symbols. The author
goes to great lengths to use informal language instead of "math" when
discussing correctness and efficiency, and in the end I think he
overdoes it. Here's an example from Chapter 7, on greedy algorithms,
discussing the scheduling problem with hard deadlines, discrete time
and tasks of equal length:

"The last question then becomes, does S' have the same profit as S?
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
6 of 7 people found the following review helpful By Cecil McGregor on June 2, 2013
Format: Paperback
While this author presents very interesting topics, following along with coding is particularly difficult. His coding style is very difficult to follow.

His habit of using single character variables (lower and upper case) obfuscates all of his code. This incredibly poor naming convention makes me wonder where this author learned to code.

He writes a function and does not provide accompanying data to create a test of the function. A developer is left to wonder how this function will work in the real world.

While the accompanying source code does contain tests, they are just as difficult to read as the book version. These tests contain few pertinent comments and one is left wondering why any one test exists. The test are certainly not unit tests since they don't apparently cover corner cases. No industrial strength QA would pass this code. And certainly no code review would allow this code into their code base.

This leaves a reader struggling to follow coding examples since he must create his own data to explore the various algorithms.

I'll allow a 4 for material and a 0 for user accessibility. The overall rating is thus a 2.
1 Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
8 of 10 people found the following review helpful By K. Noagbodji on January 21, 2011
Format: Paperback
Python Algorithms is of the same level as the book Pro Python by Marty Alchin,
also by Apress. So warning: this is not for beginners. Especially if you are
just starting with both Python and algorithms. Experienced algorists would
probably find their way through the book though.

So much for apologies, to use Dijsktra's words. This has been my hardest Apress
so far and second reading is in order. Oh and next time, I won't be skipping
the exercices. I advise you do the same. Some are very necessary if you want to
have a good grasp of all the algorithms covered.

Professor and author Magnus Lie Hetland is an experienced algorist and Python
coder. He promises in Chapter 1 (Introduction) to make you master basic
algorithms with Python and teach you how to create new ones. *cough* I think I
missed that latter part in the book. I only gathered that we can transform few
basic algorithms and apply them to new problems, especially graph algorithms.

It is thus important that you dont skip Chapter 5 (Traversal: The Skeleton Key
of Algorithmics) where I think the basics are found. No really, you don't want
to skip it. And while we are at it, you don't want to skip Chapter 4 (Induction
and Recursion... and Reduction) either. The idea of using reduction when
solving new problems is discussed in full in that chapter.

The last chapter I want to mention is Chapter 11 [Hard Problems and (Limited)
Sloppiness]. Weird but important terms used by experienced algorists are
discussed. I am talking about: solvable, tractable, P, NP, NPC, NP-hard, SAT,
etc...

The chapters I have not mentioned were difficult for me to understand. I wont
say more about them.
Read more ›
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again