This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

swap...

 
Larry Lai
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

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
 
David Weitzman
Ranch Hand
Posts: 1365
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic