Hacker News new | past | comments | ask | show | jobs | submit login
Problem Solving with Algorithms and Data Structures (interactivepython.org)
244 points by npad on Feb 26, 2015 | hide | past | favorite | 14 comments



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?


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.


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.


The book has exercises that you can type out, execute and debug in the pages itself.


Agreed. I'm interested in this book, but the format is unbearable!


I wouldn't mind hearing your criticisms of the interface. I use a fork of this book largely for the UI (not intentionally, that's just how things worked out). I am not a GUI-person, I just use Bootstrap as defensively as possible. So far, I haven't had any complaints about the affordances, but then most students don't complain unless things have gone terribly wrong. If you have specific things you can point to, it'd be helpful for my own purposes.


Just search for the pdf version on Google.


We've had a couple of virtual study group Google Hangout meetings about this book at CodeBuddies -- http://hangouts.codebuddies.org/category/data-structures-and...

IMO this is one of those books where it helps to talk about the material out loud/screenshare. The material can sometimes be dense.


Looks good. Quick note - tried to view the module index; http://interactivepython.org/runestone/static/pythonds/py-mo...

But it is returning an error at the moment!


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?!


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.


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.


You can still use an index for each symbol and track diff of child vs. parent and make sure it's never negative.


Wouldn't the worst case space complexity be the same then? for eg: ( { [ ] } ) as you will be keeping index for each the symbols. Technically it can be implemented, but isn't stack a better approach?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: