Shaker's sequential sorting algorithm is clear. But what about parallel? It is not clear that they must carry out each of the processor elements and what data should they pass to them?
Push, please, on a thought.
Shaker's sequential sorting algorithm is clear. But what about parallel? It is not clear that they must carry out each of the processor elements and what data should they pass to them?
Push, please, on a thought.
Well, the first thing that comes to mind is to break the array into parts and feed them to different streams. Results from the streams to analyze (find among all the minimum and maximum element). Next, send the arrays without the found minimum and maximum elements again to these threads, analyze the results. And so on ...
Source: https://ru.stackoverflow.com/questions/209972/