Live data from Hacker News

Ask HN: Looking for a book on algorithms and data structures

news.ycombinator.com

61–70 of 98 posts

Re: Ask HN: Looking for a book on algorithms and data structures

#61
Best I can offer is for data structure think about working backwards if possible.

Every time I've been involved in projects using 10TB+ data it's the processing that tends to expose the most bottlenecks. Nothing competes with making a pseudo dataset about 5%-10% of the size and running benchmarks which roughly match your expected workflow.

Good luck

Re: Ask HN: Looking for a book on algorithms and data structures

#62

"Foundations of Computer Science" by Aho and Ullman is an excellent book and freely available: http://i.stanford.edu/~ullman/focs.html

Came here to recommend the same. From the book's website:

"This book has been taken out of print by W. H. Freeman. You are welcome to use it if you like. We believed in 1992 it was the way to introduce theory in Computer Science, and we believe that today."

The book's introduction to stacks is in chapter 6, link: http://infolab.stanford.edu/~ullman/focs/ch06.pdf

Re: Ask HN: Looking for a book on algorithms and data structures

#63
post #58

Earlier quoted context omitted.

Art of Computer programming starts at a high school level. It's very rigorous and considered one of the more difficult reads. But if you start at chapter 1 page 1, it covers all the math you'll ever need for the rest of the books (which is sufficient maths to reach masters or even PH.d level comp sci) I know I've recommended it to high schoolers. A lot of math is just getting used to the nomenclature and vocabulary.…

AoCP is an absurdly inefficient way to learn algorithms that 99.999% of people won’t need

TAOCP is probably the best book if you approach it as infotainment/puzzles casual reading on the weekend reading about the history of trees and their mathematical properties kind of reading not anxiety filled interview passing cramming. Even autodiff online algorithms is in there something heavily used right now.

Re: Ask HN: Looking for a book on algorithms and data structures

#64
post #58

Earlier quoted context omitted.

AoCP is an absurdly inefficient way to learn algorithms that 99.999% of people won’t need

TAOCP is probably the best book if you approach it as infotainment/puzzles casual reading on the weekend reading about the history of trees and their mathematical properties kind of reading not anxiety filled interview passing cramming. Even autodiff online algorithms is in there something heavily used right now.

I've bought them and looked through it but if someone asks how they should go about learning algorithms for leetcode there are so many better options thank Knuth. That is years of effort to get through.

Re: Ask HN: Looking for a book on algorithms and data structures

#65

"Algorithms Illuminated" by Roughgarden. Very accessible. Reads like a novel not a textbook. Has exercises throughout the chapter to test knowledge. I recommend it over your suggestion that you want a textbook. This book will serve you much better.

Is there a way to buy ebooks from the seller other than Amazon (for those of us who hate Jeff Bezos ;) ?

Re: Ask HN: Looking for a book on algorithms and data structures

#66
It really depends. It is a bit difficult to answer this question without understanding your background first. What CS lectures have you already taken? What related courses (e.g., math) have you done?

For example, the Stack data structure that you bring into discussion is quite simple (but interesting and important), so I am not surprised it is treated speedily. Introduction to Algorithms typically has more difficult content.

Depending on this, I could recommend for example that you follow the lectures on the excellent MIT OCW YouTube channel (https://www.youtube.com/c/mitocw). But you could also do one of the numerous algorithms and data structures courses on coursera/edx. It all depends on what you know so far and what your goal is.

Re: Ask HN: Looking for a book on algorithms and data structures

#67
CLRS does about 5 pages on linked lists. If you want more, my advice would be to implement one in your language of choice, then look at the API for the standard lib impl of a linked list in your language of choice (if there is one).

Otherwise, for more reading on linked lists, read through adlist.c from redis, by antirez.

Next, one of the best books (IMO) on algorithmic thinking is SICP. Get through a few chapters, do the exercises, grok recursion, etc.

In no particular order:

Algorithm Design Manual, Skiena

Algorithm Design, by Kleinberg/Tardos

Algorithms, Sedgwick 4th ed. (also Algorithms in C)

If you find you need or would like more math:

Discrete Mathematics (Epp is an easier read, Rosen seems more verbose)

Mathematical Proofs, Charrand

For interview prep:

Elements of Programming Interviews (EPI)

Designing Data Intensive Applications

Re: Ask HN: Looking for a book on algorithms and data structures

#68
post #65

"Algorithms Illuminated" by Roughgarden. Very accessible. Reads like a novel not a textbook. Has exercises throughout the chapter to test knowledge. I recommend it over your suggestion that you want a textbook. This book will serve you much better.

Is there a way to buy ebooks from the seller other than Amazon (for those of us who hate Jeff Bezos ;) ?

Unfortunately no. Possibly email the author?

http://www.algorithmsilluminated.org/

Re: Ask HN: Looking for a book on algorithms and data structures

#69
post #58

Earlier quoted context omitted.

Art of Computer programming starts at a high school level. It's very rigorous and considered one of the more difficult reads. But if you start at chapter 1 page 1, it covers all the math you'll ever need for the rest of the books (which is sufficient maths to reach masters or even PH.d level comp sci) I know I've recommended it to high schoolers. A lot of math is just getting used to the nomenclature and vocabulary.…

AoCP is an absurdly inefficient way to learn algorithms that 99.999% of people won’t need

Most algorithm books don't cover the math like summations or generating functions.

Chapter one of TAOCP for better or worse, is a very rigorous mathematics introduction.

I'm not recommending it for it's algorithms (which are unfortunately somewhat out of date). I'm recommending it because it's an incredible mathematics introduction, albeit a very difficult one.

Re: Ask HN: Looking for a book on algorithms and data structures

#70
post #67

CLRS does about 5 pages on linked lists. If you want more, my advice would be to implement one in your language of choice, then look at the API for the standard lib impl of a linked list in your language of choice (if there is one). Otherwise, for more reading on linked lists, read through adlist.c from redis, by antirez. Next, one of the best books (IMO) on algorithmic thinking is SICP. Get through a few chapters, d…

EPP is a great intro for those without the preexisting math. Almost nothing is taken for granted, even high school math.
Post reply on HN