I want to implement the samplesort algorithm and would need help since I couldn't find some java code in the internet so I work with the Pseudo Code from Wikepedia. So far I have this Code:
which isn't verry much. My biggest Problem is, that I don't now much about this algorithm and I also don't find much on the internet.
So referring to the Pseudo Code on Wikepedia, I sorted the Samples. In the last step I inplemented my pivot elements with the elements from Sample.
Now I'm stuck. I don't understand how the rest of the pseudo code works because I don't know how to find j.
So somebody could make me very happy if he can help me to finish this algorithm.
There are many sorting algorithms. According to what you posted, it looks like you are trying to implement the quicksort algorithm. In my opinion the simplest sorting algorithm to understand is the bubble sort. In any case and contrary to what you claim, I did find Web pages that explain how to implement quicksort in java. Here is a page explaining quicksort in java. Simply google for quicksort java. And here is a page explaining bubble sort. Again simply google for java bubble sort. By the way, in case you are unaware, class java.util.Arrays has several, static sort() methods.