IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New *wince* modified a quicksort?
I presume by which you mean translated or changed the parameter passing or some such. QuickSort is known to be both a fragile and finely-tuned algorithm. Attempts to improve it are always at the cost of some other scenario or corner case.

Wade.

Is it enough to love
Is it enough to breathe
Somebody rip my heart out
And leave me here to bleed
 
Is it enough to die
Somebody save my life
I'd rather be Anything but Ordinary
Please

-- "Anything but Ordinary" by Avril Lavigne.

New Yes... just the objects getting hamfisted around

Though I read one article that looked intriguing... gosling finds the pivot point with (lo0 + hi0) / 2... this one guy I read on the net seemed to think that using rand might provide overall better results over the long haul. It might be fun to come up with some test cases and see what happens... but in the context of my assignment, I kept it bog standard.

\r\n\r\n

I ran some tests online and the quicksort pretty much blows the rest of the sort algorithms I've seen completely out of the water. Very nice. I've got plans for that one already:)

--\r\n-------------------------------------------------------------------\r\n* Jack Troughton                            jake at consultron.ca *\r\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\r\n* Laval Qu\ufffdbec Canada                   [link|news://news.consultron.ca|news://news.consultron.ca] *\r\n-------------------------------------------------------------------
New Yes, it is generally very good.
Just beware of the "hammer" problem ("When all you have is a hammer, every problem looks like a nail."). For a situation with a wide variety in the consistency of the input data, QuickSort is almost always the best choice. But sometimes, when the input data is controlled a but better, there are even faster algorithms. IIRC, Heapsort is much faster with data that's already in a tree-structure, for instance. And for some types of integer data, a Radix sort is preferable.

Wade.

Is it enough to love
Is it enough to breathe
Somebody rip my heart out
And leave me here to bleed
 
Is it enough to die
Somebody save my life
I'd rather be Anything but Ordinary
Please

-- "Anything but Ordinary" by Avril Lavigne.

New Is that the one where you code after getting hammered?

Hehehe

\r\n\r\n

In all seriousness, I've no doubt that there's more than one way to skin the proverbial cat. Actually, in this particular case, I suspect that the quicksort was the best option from a generalised performance pov (lists of names), but we haven't talked about sorting too much in class yet; just a selection sort, very simple, very slow. The flip side of that lecture was binary searching... which is the next area I'm going to apply myself to. Well, after I check out the Radix sort you mention. I'd already heard about heap sort, but I gotta learn some more about it... and this is the first I've heard about radix.

\r\n\r\n

Which is cool... something to keep my brain occupied this evening.:)

--\r\n-------------------------------------------------------------------\r\n* Jack Troughton                            jake at consultron.ca *\r\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\r\n* Laval Qu\ufffdbec Canada                   [link|news://news.consultron.ca|news://news.consultron.ca] *\r\n-------------------------------------------------------------------
New You'd like this book.
[link|http://www.amazon.com/exec/obidos/tg/detail/-/0201510596/qid=1045290544/sr=1-6/ref=sr_1_6/002-2641123-7667255?v=glance&s=books|Algorithms in C++]

Lotsa stuff. Linked lists, binary trees, red-black trees, sorts of many kinds, graphs and graph traversals, searches - I know there's more.

Wade.

Is it enough to love
Is it enough to breathe
Somebody rip my heart out
And leave me here to bleed
 
Is it enough to die
Somebody save my life
I'd rather be Anything but Ordinary
Please

-- "Anything but Ordinary" by Avril Lavigne.

New Yeah...:)

...though right now is not really the time for me to get it... going to go up to see my family in a day or two.

Hm. I'm searching around for what kind of resources are available on the net. There's a ton of them, but digging them out is difficult. It's easy to find an algorithm once you know its name, but just finding algorithms is not so easy...

I think the Internet could use a repository of (non-patented open) algorithms, organised by type.

--\r\n-------------------------------------------------------------------\r\n* Jack Troughton                            jake at consultron.ca *\r\n* [link|http://consultron.ca|http://consultron.ca]                   [link|irc://irc.ecomstation.ca|irc://irc.ecomstation.ca] *\r\n* Laval Qu\ufffdbec Canada                   [link|news://news.consultron.ca|news://news.consultron.ca] *\r\n-------------------------------------------------------------------
     So, how ya all doin'? - (inthane-chan) - (83)
         I'm doin >fiiine<... - (bepatient)
         GREAT! - (tseliot)
         Mostly good - (Silverlock) - (3)
             no SO? that will change eventually - (boxley) - (2)
                 Haven't been seeking - (Silverlock) - (1)
                     thats a good thing - (boxley)
         have a 5 yold slave driver - (boxley)
         Fine, fine. - (admin) - (2)
             Check this out - (drewk) - (1)
                 Yep, read that. Interesting stuff. -NT - (admin)
         Ask me this afternoon - (drewk)
         Doin' great. - (Yendor) - (3)
             Aaargh. - (pwhysall) - (2)
                 *SO* many places to go with that one... - (Yendor) - (1)
                     Oh... yessssss... - (folkert)
         I am about to have some major news, will announce in Jobs -NT - (Arkadiy)
         Rockin' - (pwhysall)
         hey, great idea - (Steve Lowe)
         Should be feeling a little overwhelmed - (tjsinclair) - (8)
             Great minds.. - (Ashton) - (1)
                 Looks like we got the car! - (tjsinclair)
             Guess what... - (folkert) - (5)
                 Well, I can't - (tjsinclair) - (4)
                     Yes you could... if you can put an application... - (folkert)
                     Friend of a friend. Or local rating agency. - (Another Scott)
                     In future for engine rebuilds and good mechanics - (boxley) - (1)
                         Exc. *practical* suggestion, Box. Will pass it on. -NT - (Ashton)
         My turn! - (inthane-chan) - (3)
             a lot on your plate - (boxley)
             Re: "No more $2k/quarter bonuses without really putting... - (a6l6e6x) - (1)
                 I'm hourly. :D - (inthane-chan)
         Its a dog eat dog world, and I'm wearing milkbone underware. - (orion) - (1)
             ICLRPD (new thread) - (tseliot)
         Not too bad. - (Another Scott)
         Static Update In Progress... - (static) - (14)
             12 yrs your junior? - (boxley) - (13)
                 Can't say I'm not trying... - (static) - (12)
                     you must be older than I thought. - (boxley) - (11)
                         I didn't make a big issue of it last month. - (static) - (10)
                             I'm 23 then, next month. BWAHAHA... -NT - (folkert) - (9)
                                 youngun - (SpiceWare) - (5)
                                     0x1F -NT - (inthane-chan)
                                     Whippersnapper - (jbrabeck) - (3)
                                         Heh. - (static) - (2)
                                             Just learn to leer properly and intro her as your relation:) -NT - (boxley) - (1)
                                                 Be prepared... - (jbrabeck)
                                 0x1B until mid-April... -NT - (Yendor) - (2)
                                     Are you getting younger or having problems with hex? :) - (a6l6e6x) - (1)
                                         Touble with hex. - (Yendor)
         Arrrrrgggggghhhhhh! - (Andrew Grygus) - (2)
             RainX - (kmself) - (1)
                 What he said, works great for snow as well -NT - (boxley)
         doing OK... - (slugbug) - (1)
             Ditto. -NT - (mmoffitt)
         Waiting is the hardest part... - (folkert) - (2)
             Adult Swim rocks... - (tjsinclair)
             Heh - another squeaker - (tuberculosis)
         Pretty good, all things considered. - (mhuber) - (3)
             empathise, my squirrel just returned from a 6 month - (boxley)
             Wow. - (inthane-chan)
             Antidepressents. - (static)
         mixed bag - (cforde)
         Yo bro - ah gotta go - back to Oz - (dmarker) - (2)
             Always wanted to see the Yellow river - (boxley) - (1)
                 Wife has always wanted to go see the silk road - (dmarker)
         Doin Aw-right! - (jb4)
         pretty good - (SpiceWare)
         Completely crazy - (jake123) - (12)
             Wow... the Dead DO Live!!!! - (folkert) - (5)
                 Rising from the deep, forty stories tall... - (jake123) - (4)
                     Sounds like DSL Down Under. - (static) - (3)
                         telstra big in cell market as well? - (boxley) - (1)
                             Oh yes. - (static)
                         Similar indeed - (jake123)
             *wince* modified a quicksort? - (static) - (5)
                 Yes... just the objects getting hamfisted around - (jake123) - (4)
                     Yes, it is generally very good. - (static) - (3)
                         Is that the one where you code after getting hammered? - (jake123) - (2)
                             You'd like this book. - (static) - (1)
                                 Yeah...:) - (jake123)
         Not bad ... - (bluke) - (1)
             yer workin, yer alive and healthy, great! -NT - (boxley)
         My two cents - (lincoln)

We didn't invent the art of wishful thinking... we just market it locally.
91 ms