Thread: C++ algorithm books

  1. #1
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728

    Question C++ algorithm books

    Hey everyone, I was looking for some good problem solving books for C++ and came across "Algorithms in C++" by Robert Sedgewick. Any recommend this book or have any gripes about it? Also, anyone know of any other great books for a semi-newbie that explores algorithms and problem solving? Thanks!

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    personally I dont like sedgewicks book at all. I would instead though suggest these three books...

    Introduction to data structures and algorithms with c++ by Glenn Rowe.

    Data structures and algorithm analysis in c++ by Mark Weiss.

    Data structures and problem solving with c++ by Mark Weiss.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    CS Author and Instructor
    Join Date
    Sep 2002
    Posts
    511
    For semi-newbies:

    C++ Data Structures book by D. Malik - Course Technology

    Also, Schaums DS with C++ Hubbard- McGraw Hill

    I have more advanced texts- for non newbies- but these should get you started.

    Also, Sedgewick is Ok, I would not personally teach out of it. Rowe and Weiss book are Ok as well.
    Mr. C: Author and Instructor

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    I think Sedgewick is not a bad book. However, whomever is responsible for coding the examples should be shot in the face. Actually, it says "with C++ consulting by Christopher J. Van Wyk" so there you have it.

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    I'm a fan of Sedgewick's book, but not the code examples.

    -Prelude
    My best code is written with the delete key.

  6. #6
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    What exactly is the problem with Sedgewicks books? Since this is the only book at my bookstore dealing with algorithms, it would be nice to have something concrete wrong with it before searching solely on the web. Also, Mister C - do the books that you recommend get into any problem solving techniques? Thanks all!

  7. #7
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >What exactly is the problem with Sedgewicks books?
    The code examples exhibit bad style. They obviously aren't meant for production code, but that is never mentioned anywhere...some of them also use void main. As long as you take the code examples with a grain of salt, the book is excellent and very thorough. The best part is that Sedgewick's book is far more readable than Knuth's, which is the only algorithms book more detailed that I have seen.

    -Prelude
    My best code is written with the delete key.

  8. #8
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    Well, considering I plan on doing most of my own examples to learn instead of copying from the book, then Sedgewick's book sounds just fine for me. Thanks Prelude! Amazing how often you help me out!

    Stone_Coder (or anyone!), I just searched on the web and found some cheap versions of Weiss's books, but they were all old editions (like 1994 and 1996). Do you know if there's much difference between these editions and the latest updates? The newest editions were a little pricey considering shipping has to be included...

  9. #9
    CS Author and Instructor
    Join Date
    Sep 2002
    Posts
    511
    Sorry, for not getting back sooner. The Malik does a little bit (problem solving). The Hubbard does not. They both cover the wide range of data structure topics- and how to use them.

    Most DS books already assume you know how to problem solve already.
    Mr. C: Author and Instructor

  10. #10
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    Thanks! I found a Sedgewick book on PDF but its rather old and uses Pascal It looks like I'm gonna buckle down and just get the new one at the bookstore!

  11. #11
    Registered User blackwyvern's Avatar
    Join Date
    Jan 2002
    Posts
    60
    I have his algorithms in C++ book and it is decent, but for a novice to intermediate programmer. If you have a lot of expirience under your belt, you could go with soemthing a little more complicated.

  12. #12
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    Unless you consider two months as having lots of experience, I'm definately a newbie! I skimmed Sedgewicks book and it looked pretty good, so I think I'll get it.

  13. #13
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    The best part is that Sedgewick's book is far more readable than Knuth's, which is the only algorithms book more detailed that I have seen.
    I found Introduction to Algorithms to be one of the best. Sedgewick's code is really too compressed. It's
    as if he's try to fit it all in one page. Weiss's books are
    too light on analysis and they use c++/c code depending
    on which one you get. The analysis
    that is used is not explained really well. Introduction to Algorithms really goes to great lengths to
    make the mathematics self contained.

  14. #14
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Sedgewick's code is really too compressed.
    That's a good thing for a book like this. You can move through the code without getting lost after flipping 6 pages. Though that may just be me. I don't think it is a good introductory book, unless you are well versed with some form or programming or higher mathematics.

    -Prelude
    My best code is written with the delete key.

  15. #15
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    That's a good thing for a book like this. You can move through the code without getting lost after flipping 6 pages.
    Well 6 pages per algorithm is Weiss's book. Really few
    of the algorithms in Introduction to Algorithms are
    more than a page.

    I don't think it is a good introductory book, unless you are well versed with some form or programming or higher mathematics.
    I'm not well versed in mathematics, but I can see someone having a tough time with it. It's not nearly as bad as Knuth's though.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Implement of a Fast Time Series Evaluation Algorithm
    By BiGreat in forum C Programming
    Replies: 7
    Last Post: 12-04-2007, 02:30 AM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  4. Algorithm Books
    By dasher in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-22-2002, 03:48 PM