[algogeeks] Re: function to print all permutations of a string

2006-07-21 Thread anurag
anurag wrote: > write a function to print all permutations of a string.can anyone > please help me hey i please know only c and c++.kindly tell me the code in them.i do know anything about java.please.try to write in pure c.please --~--~-~--~~~---~--~~ You recei

[algogeeks] Re: function to print all permutations of a string

2006-07-21 Thread Ranjit
This is in Java == public class Permute { public static void main(String[] args) { permute("", "ABCD"); } public static void permute(String parent, String s) { if (s.length() == 2) { System.out.println(parent + s);

[algogeeks] Re: function to print all permutations of a string

2006-07-21 Thread 韦日宝
or just use lib function next_permutation() in c++ std lib would be what you need? 2006/7/21, Mukul Gandhi <[EMAIL PROTECTED]>: > > anurag wrote: > > write a function to print all permutations of a string.can anyone > > please help me > > Here is a generic program (written in Java) which does thi

[algogeeks] Re: function to print all permutations of a string

2006-07-21 Thread Mukul Gandhi
anurag wrote: > write a function to print all permutations of a string.can anyone > please help me Here is a generic program (written in Java) which does this for a collection of objects. You can easily adapt it for a string. import java.util.List; import java.util.Iterator; import java.util.Col

[algogeeks] Re: function to print all permutations of a string

2006-07-20 Thread Gene
anurag wrote: > write a function to print all permutations of a string.can anyone > please help me Google "print all permutations of a string" . Sheesh... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Algorithm