This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes Permutations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Permutations" Watch "Permutations" New topic
Author

Permutations

Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Does Java have a method that generates the permutations of a given List? I'm interested in something similar to next_permutation() from the C++ <algorithm> header.

Layne


Java API Documentation
The Java Tutorial
Yilmaz Mete
Greenhorn

Joined: Dec 23, 2003
Posts: 28
I don't think such a utility exists yet.
But should be simple to code.
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
After some more research, I found some examples on the web. I know I could come up with it on my own if I want to, but I was hoping there was something already available. This is probably one of the few instances where I found the standard C++ library has functionality that is missing from the Java API.

Layne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Permutations