Is there any good book in which only different algorithms are explained for c++ ??
Is there any good book in which only different algorithms are explained for c++ ??
O_o
You mean like the second book that results when "algorithm book for C++" is entered into Google?
No. Why would there be such a book. That's just stupid.
Soma
sort of like all sorting algos, different linked list algos, encryption algos etc are mentioned
O_o
Here you go...
I've nothing else to say.
Soma
How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.
How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.
I'm not saying it won't be.
But it is not exactly suitable for someone looking for "only different algorithms are explained for c++".
It requires you to learn a whole assembly language in the second chapter, at which I bailed out, honestly.
I'll give it another try when I'm a more competent programmer and have more knowledge in mathematics.
Why?asking for a book on algorithms and C++ is like asking for a book about cars and cakes
What sort of horrible past have you had to suggest that learning about algorithms in a language you are comfortable with is flawed?
That comment of yours isn't just flawed. It is completely stupid.
For every popular language there is a book devoted to teaching common algorithms using that language. Many of them do a much better job covering the common algorithms than the "Art of Computer Programming" does because of the huge breadth of the material that series presents.
I'm totally serious here, how have you arrived at such a place as to present the above quoted comment?
It is an excellent series to read, but a terrible series from which to learn. Some of the "exercises" are research topics still unsolved.I'll give it another try when I'm a more competent programmer and have more knowledge in mathematics.
If you want to learn of the relevant algorithms I guarantee you that other many other books exist that can explain them satisfactorily without such a brutal purist approach.
If you are already capable of doing independent research into algorithm design and implementation you'll find the "Art of Computer Programming" series a great gift.
If you only want to know how a specific algorithm or class of algorithms works find a book that uses a language you are already familiar with using. Learning a new language just to consume dense material better presented by others is insane.
Soma
1. Algorithms (or the most common of them atleast), are largely timeless. C++ is not, by choosing a book specific to a certain language you have essentially bought a book with an expiration date. I'm not saying this can be avoided with all books, but it can regarding algorithms.
2. Learning to sort or search or whatever, in C++, might lock your understanding of certain algorithms to that specific language, and later on, when you've moved on to Erlang or Perl or w/e, you'll find yourself browsing Amazon for "Common algorithms in Perl". Buy a book that covers algorithms in a general sense instead.
3. By the time you feel the need to expand your knowledge of common useful algorithms, you should easily be able to understand pseudocode, and know how to translate it to real code in whatever language you choose.
Would you buy a book about driving a Ford... Or one that taught you how to drive a car??
What about a book about astronomy, with a specific brand of telescope?
Agreed, the OP didn't however specify whether he was looking for a book for complete beginners or for CS PHDs. He asked about a book for common algorithms, i find that TAOCP covers this subject better than any other book i've come across.For every popular language there is a book devoted to teaching common algorithms using that language. Many of them do a much better job covering the common algorithms than the "Art of Computer Programming" does because of the huge breadth of the material that series presents.
In retrospect, i can see how my post would come across as elitist. Apologies to the OP.
Blood, sweat and tears :-DI'm totally serious here, how have you arrived at such a place as to present the above quoted comment?
Disagreed, find a book about algorithms in general (Not necessarily TAOCP, i can recommend Introduction To Algorithms by Cormen, Leiserson, Rivest and Stein). If you then have trouble implementing it in a specific language, RTFM.It is an excellent series to read, but a terrible series from which to learn. Some of the "exercises" are research topics still unsolved.
If you want to learn of the relevant algorithms I guarantee you that other many other books exist that can explain them satisfactorily without such a brutal purist approach.
If you are already capable of doing independent research into algorithm design and implementation you'll find the "Art of Computer Programming" series a great gift.
If you only want to know how a specific algorithm or class of algorithms works find a book that uses a language you are already familiar with using. Learning a new language just to consume dense material better presented by others is insane.
Soma
How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.
Algorithms are also language agnostic.Algorithms are largely timeless.
The "Art of Computer Programming" series makes liberal and constant use of an academic assembler.Learning to sort or search or whatever, in C++, might lock your understanding of certain algorithms to that specific language, and later on, when you've moved on to Erlang or Perl or w/e, you'll find yourself browsing Amazon for "Common algorithms in Perl".
With your logic of "Learning algorithms in a language $(X) may tie your understanding of algorithms to language $(X)." the "Art of Computer Programming" would literally be the worst book to learn from because it ties you to an academic constructed language almost never used in the outside world.
Almost every algorithm book I've ever read describes the algorithm in general concepts only using real code as illustration.Buy a book that covers algorithms in a general sense instead.
Like code, a book can be a bad regardless of the language.
The "Art of Computer Programming" series uses a constructed academic assembler; the series uses neither "pseudocode" or "real code".By the time you feel the need to expand your knowledge of common useful algorithms, you should easily be able to understand pseudocode, and know how to translate it to real code in whatever language you choose.
For a beginner, seeing how facilities are implemented is equally important to understanding how the facility works. To actual use the "Art of Computer Programming" series as an instruction book (instead of a reference for a master programmer) absolutely requires one to learn a language of extremely limited use.
Okay. Let's consider the practice of "driving" equivalent to the practice of "implementing algorithms". Would you rather learn to "drive" in a car that was manufactured by one person, gets zero miles to the gallon, and is missing features like tires that are crucial to the real world? Or would you rather learn to "drive" in a car you already own and have some experience with?Would you buy a book about driving a Ford... Or one that taught you how to drive a car?? What about a book about astronomy, with a specific brand of telescope?
We are discussing a situation in which a request was made for an "algorithms book in C++" and you suggested the "Art of Computer Programming" series. A person asked for an orange because it was the flavor they wanted and you suggest spinach partially because you didn't even bother to factor in the nature of the request.
It doesn't.He asked about a book for common algorithms, i find that TAOCP covers this subject better than any other book i've come across.
You clearly either have not studied the "Art of Computer Programming" series or have not read the majority of other books.
The "Art of Computer Programming" series has overwhelming depth and breadth. It does a lousy job of presenting algorithms. The "Wikipedia" page for the common "insertion sort" does a better job than the "Art of Computer Programming" series. The "Wikipedia" page doesn't devolve into several dozen pages about optimizations and research that are beyond the grasp of most doctoral candidates. The "Wikipedia" page doesn't offer a suggestion for a magic constant time mutation to a hash table because the underlying hardware it was based on doesn't and probably never will exist.
The "Art of Computer Programming" series is ........ing amazing, but it is not and never will be a source for learning common algorithms.
If you want to study existing research into refinements of the common algorithms on your way to a doctoral thesis the "Art of Computer Programming" series is where you'll find it.
Agreed.find a book about algorithms in general
I suggest you go read the index for "Art of Computer Programming" series at your next earliest convenience. There is truly nothing "general" or "common" about the series. It is a dense mess of a catalog documenting hundreds or thousands of man years of research into common, uncommon, rare, unusual, theoretical, and impractical algorithms with notes about cache coherency, new research, practical implementation, practical limits, the performance, the academic performance, memory use, and theoretical advancements related to research that has only barely started.
What you are suggesting is literally the equivalent of suggest an theoretical physics text book by "Stephen Hawking" when an elementary textbook is needed.
Soma
Phantomotap:
I'm not going to defend the use of MMIX, i suggest you read the preface to volume 1 if you want to see some compelling arguments.
As you might or might not have read, i revised my suggestion and apologised to the OP for being an elitist jerk.
What? You state that it doesn't cover common algorithms, and then procede to describe its depth and breadth on the subject of algorithms. Makes sense.It doesn't.
You clearly either have not studied the "Art of Computer Programming" series or have not read the majority of other books.
The "Art of Computer Programming" series has overwhelming depth and breadth. It does a lousy job of presenting algorithms. The "Wikipedia" page for the common "insertion sort" does a better job than the "Art of Computer Programming" series. The "Wikipedia" page doesn't devolve into several dozen pages about optimizations and research that are beyond the grasp of most doctoral candidates. The "Wikipedia" page doesn't offer a suggestion for a magic constant time mutation to a hash table because the underlying hardware it was based on doesn't and probably never will exist.
Nowhere in this thread has the OP stated he was looking for a book for beginners, only that he wanted one specific to C++. After having been offered nothing from your first couple of sly remarks, i told him to lose the C++ part and go read TAOCP. I'm not going to put up with this ........storm, i've recommended two great books throughout this thread, you've done nothing but troll and flame, why are you even here?
How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.
O_o
Are you really that oblivious and insincere?
*shrug*
It is perfectly obvious "why I'm here"; I'm attacking your foolish book recommendation in the hopes that it will prevent someone from reading the "Art of Computer Programming" series until they are ready or better still use it as a reference and "read it" not at all.
Soma