wood burning stoves 2.0*
The moose likes Java in General and the fly likes merge sort Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "merge sort" Watch "merge sort" New topic
Author

merge sort

Maha Hassan
Ranch Hand

Joined: Aug 02, 2005
Posts: 133
Dear All
I wonder how to implament merge sort using threads, i know that i will split the array till i have array of one element then start merging but i do not know how to write this in threads ..or how to ask the thread to return the sorted array..
anyhelp??
Maha
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Start with the excellent Thread Tutorial from Sun to get the basics. You probably want something like:

Things to find in the tutorial ...

What does Thread.start() do?
What does Thread.join() do?
How do Runnable and Thread go together?

Does that answer the right question? Let us know how it goes!


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: merge sort
 
Similar Threads
a question in stacks
sort different file length records
How to cast arrays?
About Comparable and Comparator
sorting