Live data from Hacker News

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

news.ycombinator.com

31–40 of 98 posts

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

#31
post #13

If you want basics and details, the art of computer programming is a good candidate. Unfortunately, it isn’t done yet (1), and the completed parts have are very basic and have parts that are a bit dated (multi-tape sorting, for example) (1) and likely never will be. Knuth is turning 84 in two months, and isn’t even halfway writing it, after almost 60 years

It would be fitting if the work were carried on by a committee, like Bourbaki.

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

#34
If your goal is to be good at LeetCode, then save yourself the time and just go straight to LeetCode. Nobody cares if you actually understand the stuff. They just want you to come in and do the dance (recognize the problem archetype, talk through your thought process for solving it, and adjust based on whatever twists they've thrown in).

If you're interviewing for senior positions, it is worthwhile to read through Designing Data Intensive Systems. This will prepare you for System Design interviews where you do need to actually understand stuff.

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

#35
I find the writing style in CLRS to be quite readble. Sure the book is huge but so maybe pick and choose chapters but each chapter can be read "cover to cover". Perhaps some of the stack details you are looking for are left to exercises in CLRS? Most good "textbooks" will do this. Perhaps you don't want a general textbook on data structures but want a deep dive article on stacks.

I admit I haven't explored many other books on this topic but CLRS is very good in my opinion.

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

#36
post #10

The Algorithm Design Manual by Steven Skiena Amazing book. Very readable. I highly recommend it. The book has a section call "War story" at the end of each chapter in which Skiena shares his real life experience of when the contents from that particular chapter came in handy for him. Go through it. You won't regret https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena...

Not OP but I’m interested in this subject as well. I took a look at this book and others that are similar and I’ve realized my foundations on math are really lacking to even understand the given examples. Since I only had the opportunity to finish my high school diploma and this was several years ago I wonder if you could have any suggestion to brush my math knowledge up in order to properly understand the examples o…

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. The sooner you get used to rigor the better

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

#38
post #10

The Algorithm Design Manual by Steven Skiena Amazing book. Very readable. I highly recommend it. The book has a section call "War story" at the end of each chapter in which Skiena shares his real life experience of when the contents from that particular chapter came in handy for him. Go through it. You won't regret https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena...

Not OP but I’m interested in this subject as well. I took a look at this book and others that are similar and I’ve realized my foundations on math are really lacking to even understand the given examples. Since I only had the opportunity to finish my high school diploma and this was several years ago I wonder if you could have any suggestion to brush my math knowledge up in order to properly understand the examples o…

Concrete Mathematics by Graham/Knuth/Patashnik is still a great resource on the kind of mathematics and mathematical thinking we need in CS, but I'm not sure if it is fully accessible with a high-school level of Maths.

To be perfectly honest, I doubt I would've ever gotten through college-level maths without being forced to do it, as it can be very frustrating and difficult in the beginning. Unless you are quite confident in your self-discipline and enthusiasm to learn maths, rather than books I'd recommend something interactive (online course, forums, challenges).

If you are interested in a starting point to learn mathematics that are relevant for CS, I'd start with propositional logic and boolean algebra, as well as proofs via induction.

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

#39

Earlier quoted context omitted.

Not OP but I’m interested in this subject as well. I took a look at this book and others that are similar and I’ve realized my foundations on math are really lacking to even understand the given examples. Since I only had the opportunity to finish my high school diploma and this was several years ago I wonder if you could have any suggestion to brush my math knowledge up in order to properly understand the examples o…

>Since I only had the opportunity to finish my high school diploma and this was several years ago I wonder if you could have any suggestion to brush my math knowledge up in order to properly understand the examples of these books. You should really consider taking a few community college math courses if you're serious. Math is extremely difficult to learn on your own. Not only because of not knowing what you don't kn…

> You can work through the concepts and delude yourself into thinking you understand something when really you're just hand waving it

I keep seeing this and I don't quite understand how this one works.

If I were studying math on my own (which I've done and still do), I'd do the following:

1. Pick a book. Say, Rudin's Principles of Mathematical Analysis[0]. Read a section, then attempt problems. Pick a problem. Say, "prove {1/n: n is natural} U{0} is compact directly from the definition(not using Heine-Borel)". It's guaranteed your "proof" is not a proof.

2. Compare your solution to existing solution manuals or ask a question on MSE[1]. Since the given book by Rudin is super-massively famous, each question has probably been asked/answered about a bagillion times each on MSE, so just searching MSE alone would likely to spit out many answers to your questions. People on MSE will tell you exactly why your "solution" is wrong and where you tripped up. Sometimes even the clarifying answers are hard to understand. But then you can ask new questions, think more, correct your misconceptions until it all finally clicks. Do that with all the rest of the problems[2].

I don't see how the process above is delusional.

[0] This book is not a realistic fit for a novice, though. Instead, one would start with books like [3], [4], [5], [6] to learn how to prove things and think like a mathematician would.

[1] https://math.stackexchange.com/

[2] In reality, the more math you see and do, the more mathematically mature and less dependent on others(to check your work) you become. In fact, if you can solve any problem in "B@by Rudin" and some famous abstract algebra textbook (say, Dummit & Foote's "Abstract Algebra") cold, you're way ahead of most any undergrad math major in the world! Because standards on undergrad math majors are not that high, nor that brutal the world over no matter what they say. If, additionally, you can solve any given problem in a book like, say, Hatcher's "Algebraic Topology" or any other famous grad level textbooks on, say, differential geometry or, uhh, functional analysis, you're officially in the big leagues. Again, if you're worried about being delusional about your proofs, you can always present them on MSE.

[3] "Book of Proof" by Richard Hammach. It's online free.

https://www.people.vcu.edu/~rhammack/BookOfProof/

[4] "Discrete Math" by Susanna Epp

https://www.google.com/books/edition/Discrete_Mathematics_wi...

[5] "How to Think About Analysis" by Lara Alcock

https://www.google.com/books/edition/How_to_Think_about_Anal...

[6] "Linear Algebra" by Kuldeep Singh

https://www.google.com/books/edition/Linear_Algebra/BJNoAgAA...

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

#40
A great and quite unconventional book on Algorithms is "INTRODUCTION TO ALGORITHMS - A Creative Approach" by Udi Manber. After leaving academia the author was hired first by Amazon (A9.com) and then by Google. At some point around 2010 he was responsible for all search products at Google [0].

The book not only describes the algorithms per se, but also teaches how to think about the algorithms and the problems they are solving. I enjoyed it very much as a complimentary reading to the classic Knuth volumes.

[0] https://en.wikipedia.org/wiki/Udi_Manber

Post reply on HN