Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Algorithms by Jeff Erickson (2019) (illinois.edu)
377 points by kkwteh on July 16, 2022 | hide | past | favorite | 50 comments


Jeff was also very active on Academia.StackExchange, where he was invaluable in helping many early career faculty and PhD students, including myself. Nearly 97,000 reputation from more than 500 answers.

His profile: https://academia.stackexchange.com/users/65/jeffe


Also known to be the best Theory of Computation (373&374, they made changes) teacher in UIUC back in the day, potentially to this day.


He’s also relatively active as u/jeffgerickson on r/UIUC. One of the best instructors I’ve had in my lifetime


Most notable prior HN posts:

—- 1463 points|4 years ago|238 comments

https://news.ycombinator.com/item?id=18805624

—- 595 points|1 year ago|152 comments

https://news.ycombinator.com/item?id=26074289

________________________

* All other prior posts:

https://hn.algolia.com/?q=http%3A%2F%2Fjeffe.cs.illinois.edu...


Here are some books that I suggest to learn DSA properly:

1. A Common-Sense Guide to Data Structure and Algorithms from PragProg Bookshelf. Written in a very approachable manner with very good code. The best for self-learners.

2. Algorithms by Dasgupta, Papadimitriou, Vazirani (DPV). Very short and concise book- extremely well-written with a personality. Requires basic CS math.

3. Algorithm Design Manual by Skeina. Extremely approachable as well. Has 'battle stories' of algorithm usage. Good for self-learners. Links to problems in Leetcode is given.

4. CLRS is of course nice for a mathematically rigorous study.


I'll second the recommendation above. For folks coming to algorithms for the first time I would recommend _Grokking Algorithms An illustrated guide for programmers and other curious people_ as a nice quick _tour_ of the field. And the _Common Sense Guide_ (mentioned above) as the next book. For complete beginners this book has the best simple explanations of algorithms I've read in any book (and I have a whole bunch of them).


Why do you think Jeff Ericksons book is not hood for that?


Well, I can tell you why I think my book is not good for that — it isn't designed to be that!

My book grew out of lecture notes that I wrote for my algorithms classes at Illinois. My students are almost exclusively juniors and seniors. In particular, they already have several semesters of programming experience, a full semester of discrete math, and a full semester of data structures (which includes things like sorting and searching and the basics of algorithm analysis). They are the audience I wrote the book for.

Equivalently, I have very little experience teaching those prerequisite classes, which makes me the wrong person to write a textbook about that more foundational material!

At a more basic level: Different people are going to find different sources more or less useful. Different authors are better matches for different readers' backgrounds, intuition, and needs. My book ain't gonna work for everyone, because no single book works for everyone.

I'm not familiar with Common Sense Guide — thanks for the suggestion! — but the other books listed above are all fantastic (for different reasons, and for different audiences).


Hi Jeff, in your opinion, what would be the best algorithms book for students taking algo in Freshman year who want to learn it properly, in an in-depth manner?

It would really help me with many questions that I have.

Thanks.


Jeff Erickson was my favorite professor at UIUC, and his ability to explain complex ideas in meaningful ways inspired my own journey as a computer science educator.


He also has a very interesting history:

> I have the lowest undergraduate GPA (2.4/4.0) of any professor I've ever met

with reference to https://3dpancakes.typepad.com/ernie/2005/03/re_phd_with_low....


I love this quote:

> I discovered (or remembered) that I was more interested in doing things RIGHT than doing them NOW, which is bad news in the software industry; this wasn't the place for me.


The logo is "Khwarizmi" written in square kufic script, pretty cool


Jeff also owns this domain that redirects to this book:

algorithms.wtf


Oh wow, that's very cool. Did he do this as a SEO hack or just as an easy-to-remember shortcut for his book?

His illinois.edu page is the second hit for me for "algorithms wtf" in DuckDuckGo and the first hit in Google. There is a non-zero probability that I would find his book by searching for that.

Edit: Sorry if this came across as disrespectful. I don't think that a SEO hack in this case is bad. If you put your care and attention into writing and revising a 472-page textbook, you want people to find it. There's nothing wrong with that.


I don't think Jeff cares about SEO. He was out probably looking for a simple domain and I'm sure algorithms.com, algorithms.org etc. were already taken.

If I had to pick between say algorithms.me and algorithms.wtf, I'd definitely go with the second one, especially because students like me will remember it for life.


In the linked page he refers to it as a more memorable link and presents it as an easy way to comply with the terms of this book's CC license.

"Oh you're looking for an algorithms textbook, have you tried..."


As a self-taught developer this book has been an incredibly valuable resource. I'm immensely grateful that resources like this exist freely on the internet.


If you haven't reached out to Jeff, I would highly recommend sending him an email explaining how its impacted you. He is just an amazing person overall and loves to teach.


I have not and that's a great idea. Thanks!


I think he's on HN, so there is a chance he'll see that post!


Thanks for the kind feedback. I'm glad I could help!


As an undergrad studying an algorithms, I didn't not find this book useful. Somehow it managed to confuse me more.


To be fair, this book definitely doesn’t start from first principles since UIUC requires several classes before 374 (the class which uses this book). UIUC splits the data structures material into another hands-on class, and introduces discrete math and preliminary ideas about algorithm analysis and proving correctness in another course.

On top of that, 374 only uses about half this textbook in conjunction with other notes about topics not covered in this book (mostly models of computation). The rest of the material in this textbook is used in 473, the elective advanced algorithms course.

That’s not to say that your experience isn’t valid, but within the context it is primarily used in, it’s a very good additional resource to lecture content, which is more than can be said of most textbooks


So not that dissimilar from CLRS, then. Despite its introductory title it is very dense and voluminous. Almost more like a graduate level reference.

There really needs to be a text that captures the middle ground between CLRS and Grokking Algorithms and I guess this isn’t it.


I'm not familiar with Grokking Algorithms, but fwiw the most important prereq at UIUC for 374 is 173, which also happens to have a free textbook[1] written by another UIUC professor, Margaret Fleck. I consider it to be a high quality introduction to discrete math and have good memories of her as a professor as well.

[1] https://mfleck.cs.illinois.edu/building-blocks/updates-fa201...


Grokking Algorithms is an introductory illustrated book.

https://www.manning.com/books/grokking-algorithms


Perhaps Algorithms Illuminated (Roughgarden).


> I didn't not find this book useful. Somehow it managed to confuse me more.

And now you’re carrying on the tradition.


I think I had a similar experience. I suspect its because its a very unorthodox approach; the style seems more targeted towards someone with a bunch of time reading through it slowly rather than gulping it down quickly like for most undergraduate courses.

For getting me through the tests, I did end up using more traditional books. However, now, several years past academia, I find this style very engaging and delightful to read.


I worked through this one on Dan Luu's recommendation and loved it: https://www.amazon.com/gp/product/0073523402


That's one wonderfully written book.


> the style seems more targeted towards someone with a bunch of time reading through it slowly rather than gulping it down quickly like for most undergraduate courses.

Yep. That's intentional.

If you try to gulp this subject down quickly, you're much more likely to choke.


Which book ended up helping you when you were in academia?

Which one helped you learn?


For the general case, the CLRS book is recommended, but I personally found Algorithm Design by Jon Kleinberg and Eva Tardos to be the best introduction in undergrad: https://www.amazon.com/Algorithm-Design-Jon-Kleinberg/dp/032...


Despite its name CLRS goes WAY beyond an introduction


What ultimately helped you?



It's a fantastic book, but it's not worth $186.65.


That tells us a lot. ;)


Family, pancakes and algorithms. In that order (no pun intended).


A must read before any coding interview.


Link should be updated to the HTTPS version: https://jeffe.cs.illinois.edu/teaching/algorithms/


Ok, we've done that.


Why?


For example because some ISPs inject ads or malware when using HTTP.


Because of how the most popular browser on the planet treats http and there's no downside to using https. Obvious.


But there is a downside, it uses more power. I don’t see the upside in this case, hence the question.

It sounds like think so because it’s it’s what you’ve become accustomed to without questioning.


> But there is a downside, it uses more power.

It's less power than loading a one more line of markup in the browser. Do you throttle the size of webpages in the interest of power? That's as ridiculous a "downside" as having to type one more letter. https has both practical tooling advantages and security advantages. Specifically, if you're in a network (or country) that is known for tampering with network traffic, https is a well tested preventative measure.


Because otherwise everyone can read and change what you're browsing without your knowledge. AES is hardware-accelerated on most machines.




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

Search: