• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

merge sort

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic