[algogeeks] find a solution

2011-08-11 Thread Gayathri Anandan
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.



Re: [algogeeks] find a solution

2011-08-11 Thread surender sanke
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.



Re: [algogeeks] find a solution

2011-08-11 Thread Gaurav Menghani
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

-- 
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.



Re: [algogeeks] find a solution

2011-08-11 Thread Gaurav Menghani
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.



Re: [algogeeks] find a solution

2011-08-11 Thread siddharam suresh
@gaurav.menghani:
google has answer for every interview question asked. if people know how to
search, then no need to join this group.
Thank you,
Siddharam


On Thu, Aug 11, 2011 at 7:01 PM, Gaurav Menghani
gaurav.mengh...@gmail.comwrote:

 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

 --
 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.



Re: [algogeeks] find a solution

2011-08-11 Thread Gaurav Menghani
On Fri, Aug 12, 2011 at 12:09 AM, siddharam suresh
siddharam@gmail.com wrote:
 @gaurav.menghani:
 google has answer for every interview question asked. if people know how to
 search, then no need to join this group.

if people know how to search, then no need to join this group
Okay, this is hilarious. Do you actually mean that people who have
joined this group have joined because they don't know how to search? I
don't know about you, but at least I know how to search, and I still
joined.

Jokes apart, basic forum etiquette suggests one should search if the
same question has been answered already, before posting in the said
forum. This question has been answered repeatedly. If you want to
answer all repeated questions, I suggest you take the onus of doing
so.



 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

 --
 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

-- 
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.



Re: [algogeeks] find a solution

2011-08-11 Thread siddharam suresh
gaurav:
i feel we dont know when the people have joined this group and what they
want. post the answer if you are willing, otherwise just ignore it. Its
better that we should see/concentrate on the workability of the group.(my
english is poor)
Thank you
Siddharam


On Fri, Aug 12, 2011 at 11:02 AM, siddharam suresh
siddharam@gmail.comwrote:

 gaurav:
 i feel we dont know when the people have joined this group and what they
 want. post the answer if you are willing, otherwise just ignore it. Its
 better we should see the workability of the group.
 Thank you,
 Siddharam



 On Fri, Aug 12, 2011 at 10:42 AM, Gaurav Menghani 
 gaurav.mengh...@gmail.com wrote:

 On Fri, Aug 12, 2011 at 12:09 AM, siddharam suresh
 siddharam@gmail.com wrote:
  @gaurav.menghani:
  google has answer for every interview question asked. if people know how
 to
  search, then no need to join this group.

 if people know how to search, then no need to join this group
 Okay, this is hilarious. Do you actually mean that people who have
 joined this group have joined because they don't know how to search? I
 don't know about you, but at least I know how to search, and I still
 joined.

 Jokes apart, basic forum etiquette suggests one should search if the
 same question has been answered already, before posting in the said
 forum. This question has been answered repeatedly. If you want to
 answer all repeated questions, I suggest you take the onus of doing
 so.

 
 
  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
 
  --
  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

 --
 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.



Re: [algogeeks] find a solution

2011-08-11 Thread Gaurav Menghani
No its just that we avoid repetitive stuff. Saves energy for everyone.

On Fri, Aug 12, 2011 at 11:06 AM, siddharam suresh
siddharam@gmail.com wrote:
 gaurav:
 i feel we dont know when the people have joined this group and what they
 want. post the answer if you are willing, otherwise just ignore it. Its
 better that we should see/concentrate on the workability of the group.(my
 english is poor)
 Thank you
 Siddharam


 On Fri, Aug 12, 2011 at 11:02 AM, siddharam suresh siddharam@gmail.com
 wrote:

 gaurav:
 i feel we dont know when the people have joined this group and what they
 want. post the answer if you are willing, otherwise just ignore it. Its
 better we should see the workability of the group.
 Thank you,
 Siddharam


 On Fri, Aug 12, 2011 at 10:42 AM, Gaurav Menghani
 gaurav.mengh...@gmail.com wrote:

 On Fri, Aug 12, 2011 at 12:09 AM, siddharam suresh
 siddharam@gmail.com wrote:
  @gaurav.menghani:
  google has answer for every interview question asked. if people know
  how to
  search, then no need to join this group.

 if people know how to search, then no need to join this group
 Okay, this is hilarious. Do you actually mean that people who have
 joined this group have joined because they don't know how to search? I
 don't know about you, but at least I know how to search, and I still
 joined.

 Jokes apart, basic forum etiquette suggests one should search if the
 same question has been answered already, before posting in the said
 forum. This question has been answered repeatedly. If you want to
 answer all repeated questions, I suggest you take the onus of doing
 so.

 
 
  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
 
  --
  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

 --
 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

-- 
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.