Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combination algorithm

Status
Not open for further replies.

DotNetGnat

Programmer
Mar 10, 2005
5,548
0
0
IN
Hi Guys,

I am trying to come up with an algorithm that takes two input strings "L" and "R" and an int n that tells number of combinations.

if n is 1, the result should be L, R
if n is 2, the result should be LL, LR, RL, RR
if n is 3, the result should be LLL, LLR, LRL, LRR, RRL, RRR

and so on...and preferally oredered as shown above...

any suggestions or ideas are welcome...

Thanks

-DNG
 
alright guys,

ignore this post...thanks for looking though...

I have figured it out...

-DNG
 
care to share?

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top