Cover of Algorithms in C++

Algorithms in C++

by Robert Sedgewick · first published 1990

45mentions
27recommended by
37HN commenters
2009–2025first – last mentioned

73% recommend22% neutral5% critical

Why HN recommends it

Accessible, well-written introduction to algorithms that builds from elementary to advanced structures; suits students and self-taught programmers who want code implementations. Graph and trie coverage is praised.

Summarised by Claude from recommending comments

Robert Sedgewick has thoroughly rewritten and substantially expanded his popular work to provide current and comprehensive coverage of important algorithms and data structures. Many new algorithms are presented, and the explanations of each algorithm are much more detailed than in previous editions. A new text design and detailed, innovative figures, with accompanying commentary, greatly enhance the presentation. The third edition retains the successful blend of theory and practice that has made Sedgewick's work an invaluable resource for more than 250,000 programmers! Whether you are a studen

Affiliate links. As an Amazon Associate I earn from qualifying purchases.

Mentions per year

70 2007: 0 mentions2008: 0 mentions2009: 3 mentions2010: 3 mentions2011: 4 mentions2012: 7 mentions2013: 4 mentions2014: 2 mentions2015: 3 mentions2016: 2 mentions2017: 3 mentions2018: 2 mentions2019: 3 mentions2020: 1 mention2021: 4 mentions2022: 1 mention2023: 1 mention2024: 0 mentions2025: 1 mention2026: 0 mentions200720172026

What Hacker News says

  • alfiejohn_ · Aug 25, 2013 · Recommends

    Great, but I hope it doesn't follow the book... "Algorithms in C" by Sedgewick is a great book, which uses C to implement the algorithms talked about in the book. "Algorithms" also by Sedgewick, which looks like this course is based on, spends a hell of a lot of time…

    on “Algorithms, Part I: Kevin Wayne and Robert Sedgewick” ↗
  • hacknat · Sep 20, 2013 · Recommends

    …Lately, I've been digging into the Linux and Win32 apis, and have had some opportunities to write two native projects for my company and I really loved both projects.I've been working through Sedgewick's Algorithms in C++ and I've been loving it. I am incredibly lucky to work with great technologists who look out for me and let me do things like the two native projects I mentioned, but when it comes down to brass tax…

    on “Ask HN: Should I leave my job? If so what are my next steps?” ↗
  • mrexroad · Sep 8, 2017 · Recommends

    another thing you may find inspiration from are algorithm visualizations referenced or created by Edward Tufte [1] "Excellent sparkline-like graphics from Robert Sedgewick, Algorithms in C (1998) Sparklines and sparkline-like graphs can also move within complex multivariate spaces, as in these 9-step sequential results (reading down the columns) in merge-sorting 5 different types of input…

    on “Show HN: A coloring book of data structures and algorithms” ↗
  • mahmud · Jul 10, 2009 · Recommends

    Algorithms in C is a classic, Algorithms in Foo is, sadly, not. Sedgewick's text, much like Appel's compiler text, is a one-language book with a bad gettext translation for other programming languages. Read Sedgewick…

    on “"Is that a real program or is that something somebody wrote?"” ↗
  • fmendez · Oct 7, 2009 · Recommends

    You should try 'Algorithms in C++ Part 5: Graph Algorithms (3rd Edition)' i had lots of fun with that one :). note: fun == countless nights solving problems :P note2: link to the book http://www.amazon.com/Algorithms-Part-Graph-3rd-Pt-5/dp/0201...

    on “Ask HN: Graph theory books?” ↗
  • antirez · Dec 22, 2016 · Recommends

    Sedgewick is a very good writer IMHO. I learned algorithms with his famous book "Algorithms in C". Later I read many different algorithms books, and there are better books from specific point of views, however as an entry level book I think that AiC is one of the most accessible for students. Btw,…

    on “Cardinality Estimation (2011) [pdf]” ↗
  • sn9 · Jan 17, 2017 · Recommends

    Hanson's C Interfaces and Implementations [0] is one of the best books on the subject. Strongly complemented by Sedgewick's Algorithms in C. [0] https://www.amazon.com/Interfaces-Implementations-Techniques...

    on “Show HN: Crafting Interpreters – A handbook for making programming languages” ↗
  • epakai · Oct 6, 2019 · Recommends

    …and is quite in-depth. "Mastering Algorithms with C" is split nearly 50/50 between them and has real code examples though I don't care for the coding style. My personal preference has been Sedgewick's "Algorithms in C" which introduces elementary structures first and more advanced ones with their algorithms. Sedgewick's latest "Algorithms" has Java code if you prefer, and it still rates well.

    on “Ask HN: What are the top textbooks for data structures?” ↗
  • mindcrime · Aug 23, 2012 · Recommends

    …Abraham Silberschatz Introduction to Algorithms by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein One (or more) of the Algorithms in FOO series by Robert Sedgewick. There are Algorithms in C, Algorithms in C++ and Algorithms in Java to pick from. Each is a multi-part series. The Java one goes up to at least 5 parts, I can't recall offhand if the series numbering is identical across languages.…

    on “Steps to become a good hacker?” ↗
  • kragen · Jul 22, 2022 · Recommends

    …relatively small amount of extra memory. — ⁂ — However, like FORTH, fancy data structures are a bit of an attractive nuisance: they tempt you to get into trouble. When I first came across Sedgewick's Algorithms in C it was a revelation to me: here were so many clever ways of breaking down problems that made apparently impossible problems easy. (I had come across sorting algorithms before but I didn't really understand…

    on “Ask HN: What are some cool but obscure data structures you know about?” ↗
  • timtadh · Apr 4, 2010 · Recommends

    I have also been getting into tries recently (last 6 months) and if you are interested in learning about them I recommend Sedgewick's Algorithms in C (parts 1-4) for a good introduction to the subject. Available on Safari if you have access to that.

    on “Trees, Hash Tables and Tries” ↗
  • xentronium · Dec 1, 2010 · Recommends

    …start Good books include monographies about algorithms. In Russia, the most popular books on the subject are: * Introduction to Algorithms (Cormen) * Algorithms and Data Structures (Wirth) * Algorithms [in C++] (Sedgewick) Don Knuth also has remarkable works but they're somewhat more into proofs and math.

    on “Teen Mathletes Do Battle at Algorithm Olympics” ↗
  • ChuckMcM · May 29, 2011 · Recommends

    I would include "Algorithms in C" by Sedgewick [1] and might tone down the wilder side (I mean it is important to understand the dark side of the force but not to dwell on it (unless you're an secops type)). [1] http://www.amazon.com/Algorithms-Parts-1-5-Bundle-Fundamenta...

  • veyron · Jun 24, 2011 · Recommends

    Power through sedgewick's Algorithms in C++: http://www.amazon.com/Algorithms-C-Robert-Sedgewick/dp/02015... Although, tbh, the code coverage is kinda weak, so I would supplement it with a C or C++ discussion (K&R is tough to understand, but…

    on “How to design a CS curriculum for middle/high school?” ↗
  • veyron · Feb 15, 2012 · Recommends

    The author definitely should have included Algorithms in C++ [Sedgewick] and Introduction to Algorithms [CLRS].

    on “Books every self-taught computer scientist should read” ↗

Keyboard shortcuts

/
Focus search
j / k
Next / previous book
Enter
Open focused book
Esc
Close / go back
g h
Go to Home
g t
Go to Top all-time
g m
Go to Most recommended
g r
Go to Rising
g f
Go to For You
?
Show this help