Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

"n" Dimensions

Name: Anonymous 2011-10-02 22:21

I have to create an a multi-dimensional Array of "n" dimensions in JAVA, and was wondering if anyone had any tips for getting this done.  I am not asking for code just some ideas of how I can go about doing this.  Thank you in advance.

Name: Anonymous 2011-10-02 22:21

That's a horrible idea.

Name: Anonymous 2011-10-02 22:23

Your program should allow the user to specify an arbitrary input file and prefix length n order to generate frequencies and then use those frequencies to generate a user-specified length of text

http://mathcs.wilkes.edu/~kapolka/cs225/travesty.pdf<------ go to array section

The first bit is my assignment.  Maybe that would help.

Name: Anonymous 2011-10-02 22:25

Name: Anonymous 2011-10-02 23:19


int array_size = bound[0];
for(int i = 1; i < n; ++i)
   array_size *= bound[i];
n_array = new array[array_size];


gee that was hard

Name: Anonymous 2011-10-02 23:52

CS undergrads are this retarded

Name: Anonymous 2011-10-03 0:46

>>6

We all had to start out somewhere, amirite?

Heya OP, Say you have an 5 dimensional array where the length in each dimension is 10, and say you want to represent this array as a one dimensional array. Where do you think the slot, (3, 5, 2, 3, 1) should go in the one dimensional array?

Name: Anonymous 2011-10-03 1:38

>>7
That's a great interview question, I think. I wonder how many CS graduates can't answer that.

Name: Anonymous 2011-10-03 2:59

>>7
Is the answer 3*10^4+5*10^3+2*10^2+3*10^1+1*10^0?

I'm not a CS grad. Engineering, but what would be the best way to do it?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List