Solved

Generate All Possible Answers From Groups of Values

Posted on 2004-09-13
1
216 Views
Last Modified: 2010-04-23
I have multiple groups of values that I need to generate all the possible combinations from. I have two parts to my question:

1. The best way to store these values. (Hashtable, DataTable, etc.)
2. Fastest way to generate all the possible combinations.

I have multiple groups with different values. (Randomly generated)

Example:

G1   G2   G3
============
A     R     X
B     S     Y
C     T     Z

The final answer is created by 1 value from each group in order. G1-G2-G3
Example Answers:

A-S-X
or
B-R-Z

I need to generate all the possible answers.

Thanks for the help!
0
Comment
Question by:icosupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 250 total points
ID: 12047762
Your request is almost the same as this one:
http://www.experts-exchange.com/Programming/Programming_Languages/Q_21116627.html

Several different approaches there that you can use.

Idle_Mind
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question