In C++ it is done in the following way: - Concatenate all strings - Sort the string - Use next_permuation
On Thu, Aug 11, 2011 at 7:01 PM, Gaurav Menghani <[email protected]> wrote: > I guess we should learn to google first. > > On Thu, Aug 11, 2011 at 5:58 PM, surender sanke <[email protected]> wrote: >> concatenate both and find all permutations of that string >> >> surender >> >> On Thu, Aug 11, 2011 at 5:34 PM, Gayathri Anandan >> <[email protected]> wrote: >>> >>> Given two strings say "AB" and "CD" you should print all the possible >>> combinations. Use any language. >>> >>> output: ABCD, ABDC, ACDB, ADBD, ADBC, ADCB etc. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > Gaurav Menghani > -- Gaurav Menghani -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
