This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
I'm not sure what swap it is... Here is an example code:
If anyone knows, tell me what it's going on...or give one more example for me learning...
Thanks a lot Larry
posted 13 years ago
If I'm not mistaken, you seem to have some code from an implementation of QuickSort. Swap would look something like this:
The split() method is dividing the array into two partitions. The elements in one partition are all greater than the elements in the other partition. The return value of split() is the location where the partitions meet.