473,378 Members | 1,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Very, Very Complex Array!!!

cindy2
35
Hi, I have a VERY complex problem.

I need a 2D array with x*x elements. There are two cases:

1) 4 <= x < 8
2) 8 <= x <= 10

Case 1)

Every COLUMN of the array must be randomly filled with the letters a, b, c and d. Each column can only have each letter one time. If x is bigger than 4, then the vacancies of each column must be filled with k's (as many as necessary).
Also it's not allowed to have 2 k's one after the other in a ROW.

Case 2)

Every COLUMN of the array must be randomly filled with the letters a, b, c, d, e, f, g and h. Each column can only have each letter one time. If x is bigger than 8, then the vacancies of each column must be filled with k's (as many as necessary).
Also it's not allowed to have 2 k's one after the other in a ROW.


Does anybody know how I can make this very complex array?

Cindy
Sep 20 '07 #1
1 1119
kadghar
1,295 Expert 1GB
To make the array is simple, just define it
dim arr(x, x) as string
and you're done.

Now, to fit your requirements, I'll strongly recomend you to post your problem in the games & puzzles forum, I think Rabbit will solve it in a couple of minutes, after that you'll only have to write the code.

If what you want is a code that solves it, I think it's quite similar to the 8 queens puzzle,

HTH
Sep 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: sjaak538 | last post by:
Hello I've a question about printing complex array's with print_r $xmlC->obj_data I get this example bellow But can anybody give me one example on how to echo $xmlC->obj_data; I try'd with...
9
by: Christopher Benson-Manica | last post by:
Recently, the following definition was posted to comp.lang.c++: > char **Arr; 1) Is the type of this object "array of 3 (array of two of pointer to pointer to char)"? If not, what is it? ...
4
by: johnny | last post by:
hi all, I hope it is easier for you to answer than for me trying to explain it... In a database I have some tables , each one has some mandatory fields at the beginning and a couple at the...
3
by: soxcited | last post by:
Dear All, Ive started learning Python couple of hours ago, after working with IDL for a long time and I have a question I hope you would not mind answering. I have a binary file that I would...
2
by: David TG | last post by:
Hiya! I would like to take a partial slice of a fairly complex array. The source looks something like array ( ==array ( ==NN
1
cindy2
by: cindy2 | last post by:
Hi, I have a VERY complex problem. I have posted it under Forums/Visual Basic, but I was strongley recommended to post it here. In VB2005 I need a 2D array with x*x elements. There are two cases: ...
4
by: cleanrabbit | last post by:
Hello! I hate having to do this, because im almost certain there is someone in the world that has come across this problem and i just havent found their solution yet, so i do appologise if this...
1
by: cronet | last post by:
Hi, i want to do some sortings to a complex array. The array structure is at the end of this message Now I want the result sorted in that way: SingleRoom ($hotel) - lowest rate ($hotel )
1
by: amskape | last post by:
Hi pals, I got a complex Array from the Query. it's Structure is like Array ( => Array ( => anes.admod.net => 1 => 1
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.