top | item 9111958

Problem Solving with Algorithms and Data Structures

244 points| npad | 11 years ago |interactivepython.org

14 comments

order
[+] nirkalimi|11 years ago|reply
I read this book cover to cover.

For someone self taught, who has a beginner understanding of Python (control structures, data types, classes, functions, loops, etc) this is undoubtedly the easiest way to introduce them to Algorithms and Abstract Data structures. This really takes a beginner to an intermediate level in small easily digestible chunks.

My question to you now, HN: are there any books on the market that can guide a beginner/itermediate (who knows Python and perhaps a framework like Django) to better understand the ins and outs of programming for the web? I am not talking about getting an app up and running, I am talking about understanding the flow of data, maybe things like WSGI, security, APIs, etc. Something that can really take an intermediate to an "Expert" level.

Any Suggestions?

[+] yulaow|11 years ago|reply
I still can't understand why, once they have a free version available in form of a html page, they don't give also a free pdf version far more readable and portable.
[+] acbart|11 years ago|reply
Hi, I'm a researcher using a (massive) fork of the Runestone platform. I'm pretty familiar with their technology and group. They use sphinx to generate html pages that then interact with their website through ajax. Their entire focus is on an interactive web experience for their book. Techniaclly, sphinx can export to PDF, but I doubt they've ever tried (I certainly haven't bothered in my fork), because the core functionality that we both trumpet is the interactivity.

That said: if you print individual pages with Chrome's Print to PDF feature, I think you'll be pleased with the result. The formatting tends to be very good (without extraneous markup and such, except for the interactive stuff - which was never going to go well.

I'm sure there are ways to script that printing - if not, then there aren't so many chapters that it would get excessive, I imagine. Personally, none of my students have ever requested an offline version of the book, but that might just as easily be because they never considered the utility of such a thing.

[+] devnonymous|11 years ago|reply
The book has exercises that you can type out, execute and debug in the pages itself.
[+] turingmachin|11 years ago|reply
Agreed. I'm interested in this book, but the format is unbearable!
[+] adam12|11 years ago|reply
Just search for the pdf version on Google.
[+] msoad|11 years ago|reply
The "Simple Balanced Parentheses" problem solution does not have to use a stack one index for opening(+1) and closing(-1) parentheses should be enough. Or am I wrong?!
[+] gms7777|11 years ago|reply
I believe you are correct. Instead of using a stack, you can add one for opening, subtract one for closing and as long as your count is non-negative, it will work the same way. Its effectively the same algorithm, except instead of actually keeping the stack, you're keeping track of the number of objects in the stack, and it'll reduce your worst case space requirement from linear in the number of parentheses to logarithmic.
[+] RadioactiveMan|11 years ago|reply
If you're working with multiple symbols, such as (), {}, and [], you'd want to use a stack. Closing a child ( before its parent { would be an error.