Results 1 to 6 of 6
Thread: quicksort program
- 03-03-2009, 02:47 AM #1
Member
- Join Date
- Jan 2008
- Posts
- 36
- Rep Power
- 0
quicksort program
hello guys, I am in deep and need some real help i need to create a program that does quicksort for class and i have no idea how to do it, can someone help me... here is what i need
Thank you to anyone who is going to help me i really appreciate itThis programming assignment is to implement and compare the following sorting algorithms :
1. quicksort (recursive version ) , use the median of three as the pivot element.
2. quicksort (recursive version ), using median of three for pivot and switch to insertion sort when size of array is less than certain predetermined integer -- the cutoff size
3. quicksort (non-recursive)
4. mergesort recursive
Java Generic must be used for each of the sorting method.
You should use arrays instead of ArrayLists or LinkedList to store
data.
(I will test your sorting methods on arrays of different class of
comparable objects, such as Double, Rational number etc .)
Put all the sorting methods in one class ( Sort.java ).
Do not package.
You also have to provide Tester class that
1. generates arrays of Integers of any given size .
2. use each sorting method to sort the array and measure the
running time for each case.
3. You might also include other utility methods.
You must submit the following:
* All the Java source codes
* Documentation that describes what you did, and how to run your program
To run the program :
Type the command : java Test1 10000
-
Unfortunately you don't really ask a specific question here, and so all I can do is refer you to a decent reference on the quicksort algorithm which you can find here: QuickSort At Wikipedia
If this isn't enough to help, then you'd be best to do as much of this assignment as you can, and then come back with your code and a specific question regarding your code. Best of luck.
- 03-03-2009, 03:21 AM #3
Member
- Join Date
- Jan 2008
- Posts
- 36
- Rep Power
- 0
thats the thing, i dont know anything about java and dont know how to write the code, can you help me put together the code to do the required parts of the homework?
-
Come on now. Asking others to do your homework is cheating. Surely you know better than to ask this. Please don't ask this again and I won't report you to the moderators. I strongly urge you to either talk to your teacher about arranging tutoring or consider dropping this class.
Last edited by Fubarable; 03-03-2009 at 03:29 AM.
- 03-03-2009, 03:41 AM #5
Member
- Join Date
- Jan 2008
- Posts
- 36
- Rep Power
- 0
ive already dropped a class this quarter and im on quarter away from graudating and this class is the only one holding me back, all i need is help with one assingment. a desperate student who cant afford to lose 2000 dollars for a class in java that he knows nothing about needs help thats all im asking, for help.
-
I'm afraid that your predicament is just that, your predicament. We can help you, but still it is your assignment and you must do it. You surely know a little Java, enough to get started at least setting up the problem, right?
So break this problem down into small tasks, the smaller the better, and start working on each task. This sometimes easier to do by creating several small separate programs, then when each task is solved combining the parts into a whole. Then if you get stuck in any specific spot, come on back and ask a question. We'd be more than happy to help. But remember that specific answers will mainly come from specific questions.
But what we cannot do, and what you should not ask is for anyone to write the assignment for you. I'm not sure that I can make it any more plain than that.
Again, best of luck.
Similar Threads
-
Execute A program from a Program!
By Moncleared in forum Advanced JavaReplies: 2Last Post: 02-22-2009, 04:17 PM -
Quicksort
By little_polarbear in forum New To JavaReplies: 12Last Post: 07-12-2008, 09:20 PM -
Executing a program within a program
By gibsonrocker800 in forum New To JavaReplies: 5Last Post: 05-12-2008, 08:24 AM -
How to execute an External Program through Java program
By Java Tip in forum java.ioReplies: 0Last Post: 04-04-2008, 02:40 PM -
How to execute an External Program through Java program
By JavaBean in forum Java TipReplies: 0Last Post: 10-04-2007, 09:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks