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 <gaurav.mengh...@gmail.com> wrote: > I guess we should learn to google first. > > On Thu, Aug 11, 2011 at 5:58 PM, surender sanke <surend...@gmail.com> wrote: >> concatenate both and find all permutations of that string >> >> surender >> >> On Thu, Aug 11, 2011 at 5:34 PM, Gayathri Anandan >> <gayathriananda...@gmail.com> 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 algogeeks@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com. >>> 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 algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> 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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.