none
What's the best book describes Algorithms for beginners?

    Question

  • Hi,

     

    I'm new to C/C++ languages, I was a .NET developer. I study computer programming myself, I'm not a computer science/engineering student.

     

    Because I was studying .NET, everything was easy, lists, searches, anything. After I started C/C++ development, it becomes very difficult to implement advanced searches, lists, and other things related to algorithms.

     

    I got the book "Introduction to Algorithms" and started reading it but I found it very difficult since I haven't ever read about Algorithms (just short pages of other books.)

     

    Anyone knows a book that discusses Algorithms in C in a very simple way? I need the author to treat me as an idiot or someone haven't ever read about programming or computers at all.

     

    Thank you in advance.


    From a technology evangelist born in 1991 in Egypt, http://JustLikeAMagic.WordPress.com
    Thursday, July 08, 2010 8:58 AM

Answers

  • std::vector<> is a 'list' in the .NET sense. std::list<> is a 'list' in the C sense. std::map<> and std::set<> are trees. All are part of the STL, and all are covered in the books I suggested. I'm not clear on what you're looking for if these don't qualify.

    If you're asking about data structure and algorithm theory, so you can write your own rather than use the ones that come with the standard library (which is a bad idea 99% of the time), the best book in my opinion is Algorithms in C++. Data Structures and Algorithms is also excellent, but not C++ specific.

    Thursday, July 08, 2010 11:19 AM

All replies

  • If you're willing to buy a book, The C++ Standard Library: A Tutorial and Reference is the usual recommendation. If you want a free book, the author of Thinking in C++ has made the book available for free. Volume two covers algorithms, if I remember correctly.

    Thursday, July 08, 2010 9:02 AM
  • Because I was studying .NET, everything was easy, lists, searches, anything. After I started C/C++ development, it becomes very difficult to implement advanced searches, lists, and other things related to algorithms.


    I'd like to reinforce ildjarn's suggestion: if you're moving into C++ programming you should put effort into learning about the containers and algorithms supported by the Standard Template Library ("STL").  These are designed to support just the kind of thing you are looking for.  Unfortunately, this requires learning about C++ templates...


    ---- Answering policy: see profile.
    Thursday, July 08, 2010 10:10 AM
  • @ildjarn @David Boyce UK

     

    First, I'd like to thank you very much for your quick response.

     

    I know how to use STL and I loved templates very much, they're very easy and very help

     

    The problem here is, as I know, there's no STL equivalent for C (at least in the Standard Library). Therefore, I've to do it myself. I can create simple lists, sort them, etc. However, I can't create trees, or at least, I can't manage them efficiently.

     

    "Introduction to Algorithms" is very sufficient for me, that's actually what I was looking for. However, I found it somewhat difficult. So, is there's any book simpler than "Introduction to Algorithms"? or how I can improve my programming skills to be able to create common types of lists manually?


    From a technology evangelist born in 1991 in Egypt, http://JustLikeAMagic.WordPress.com
    Thursday, July 08, 2010 10:43 AM
  • std::vector<> is a 'list' in the .NET sense. std::list<> is a 'list' in the C sense. std::map<> and std::set<> are trees. All are part of the STL, and all are covered in the books I suggested. I'm not clear on what you're looking for if these don't qualify.

    If you're asking about data structure and algorithm theory, so you can write your own rather than use the ones that come with the standard library (which is a bad idea 99% of the time), the best book in my opinion is Algorithms in C++. Data Structures and Algorithms is also excellent, but not C++ specific.

    Thursday, July 08, 2010 11:19 AM
  • Thanks for your suggestions I'll check them today.

     

    I'm not trying to reinvent the wheel, but I'm just trying to to understand how it works :)

     

    "Introduction to Algorithms" is a great book. I just realized that my problem is that I don't understand Algebra very well :(, I went to the library and got a very nice book discusses it and I'll try to finish it as soon as possible so I can continue my study about Algorithms.

     

    Pray for me :)

     

     

    Thanks alot, thanks for your suggestions, and thanks for your continued support :))


    From a technology evangelist born in 1991 in Egypt, http://JustLikeAMagic.WordPress.com
    Thursday, July 08, 2010 5:12 PM