1. ## C algorithm

Hello All,

Can anybody provide me good web link for C algorithm?

Thanks,
Happy Man

2. what are you talking about??

3. Algorithm for a C compiler?
Algorithm for a quicksort in C?
Algorithm for a function that prints a "C" to the screen?

What the hell do you want from us?!?!?

4. >Can anybody provide me good web link for C algorithm?
Here, pick one. The implementations aren't all in C, but the coverage is nice. If you want to learn about algorithms then I suggest getting a few books. It's easier than netdiving for ages just to end up with crappy code.

5. I want to know all sorting algorithm and their comparisn with respect to speed and memory consumption?

6. >I want to know all sorting algorithm
Have fun. Of course, if you only want to know about the more common sorting algorithms, it's easier.

>and their comparisn with respect to speed and memory consumption?
Fair enough. Can you describe your data? Type, amount, how it's stored, etc... All of these are factors in choosing a sorting algorithm. But here are a few you can research:

Bubblesort
Insertion Sort
Selection Sort
Shell Sort
Merge Sort
Quick Sort
Heap Sort
Tree Sort
Introspective Sort

They all vary in requirements, speed and implementation, but all have a case where they are most useful. There are many more as well. The topic is just too broad to properly answer your question as you asked it. Can you be more specific?

7. i have done the analysis, hybrid heap-quicksort with an insertion step for n < 5 and merge sort for special runs of m is the best

8. Hi Happy Man,

in addition to what's mentioned above, you may want to check http://www.nr.com for numerical algorithms in C.

-strontium90

9. Originally Posted by ggs
i have done the analysis, hybrid heap-quicksort with an insertion step for n < 5 and merge sort for special runs of m is the best
If I may quote your avatar, sir,
n0 l1f3

10. >hybrid heap-quicksort with an insertion step for n < 5 and merge sort for special runs of m
Which would essentially be one variation of introspective sort.

11. Originally Posted by Prelude
>hybrid heap-quicksort with an insertion step for n < 5 and merge sort for special runs of m
Which would essentially be one variation of introspective sort.

well, that depends on the phase of the moon (all that lunar electrostatic interference)

edit: to say i am shocked and bemused to see that hybrid quicksort and heapsort is quite well known (!)

vv

12. >well, that depends on the phase of the moon (all that lunar electrostatic interference)
Feh, and here I had been basing my collection of sort algorithms on the alignment of the planets. No wonder I can't shave off those last few clock cycles.

13. Hello All,

Can anybody provide me good web link for C algorithm?

Thanks,
Happy Man
Before everyone went off on a tangent, I took this to mean good algorithmS.

I think all you guys were a bit harsh - You lynch a guy for missing an "s" !

I don't know of any web links, but if you want a good starting point, "The Art of Computer Programming" series (3 volumes) by Knuth is great, even though it's been around for a while now (30 years I think). I seem to remember the examples are in fortran.

I found it pretty fascinating (in a nerdy sort of way) when I first came across it. Wish I still had a copy.

14. >I think all you guys were a bit harsh
Not all of us, thank you very much.

>"The Art of Computer Programming" series (3 volumes) by Knuth is great
Definitely. Though not for the weak of heart.

>even though it's been around for a while now (30 years I think).
They're being updated. My most recent copies are copyrighted 1998.

>I seem to remember the examples are in fortran.
Fictitious ASM called MIX invented by Knuth for the books.

>Wish I still had a copy.
I haven't been to a bookstore in ages that didn't have at least one volume.

15. >I think all you guys were a bit harsh
Not all of us, thank you very much.

I was excluding you by default of course, Prelude. (Yeah, yeah, and all you other "nice" people)

>even though it's been around for a while now (30 years I think).
They're being updated. My most recent copies are copyrighted 1998.

Woohoo ! - I'll definitely purchase said items once funds are available.