
-----------------------------------
arden
Sat Mar 03, 2007 10:30 am

QuickSort implementation help
-----------------------------------
OK, so here's the deal. Our class has an assignment that has us researching on different sorting algorithms and writing a report on it. First, we have to implement the algorithm to be able to test its functionality. The one I chose is QuickSort. At school, I found a QuickSort class from this site:



Can someone please help me? That was the simplest implementation of the QuickSort and the only one I could find that was appropriate for my assignment. And the assignment's due pretty soon (Tuesday). Thanks.

-----------------------------------
wtd
Sat Mar 03, 2007 10:42 am

RE:QuickSort implementation help
-----------------------------------
The coe you saw was written for Java 1.4.  You are likely using the Java 1.5 compiler, where Comparable is a generic interface.

You can either choose to understand this difference, or just tell the compiler that the source is Java 1.4.

-----------------------------------
arden
Sat Mar 03, 2007 10:44 am

Re: QuickSort implementation help
-----------------------------------
Sorry, but how do I do that?  :)

-----------------------------------
wtd
Sat Mar 03, 2007 10:58 am

RE:QuickSort implementation help
-----------------------------------
Do I get the credit if I do all of your homework for you?  ;)

-----------------------------------
arden
Sat Mar 03, 2007 11:31 am

Re: QuickSort implementation help
-----------------------------------
Sure, if you want.  :shock: 

On a serious note, I just changed Comparable[] to Integer[] since we're only testing on integers anyway. Thanks for your help.
