+ 1
5x5 matrix from Array
i need to create a 5x5 matrix from a single dimensional array, then calculate the sum of the second column, could people give any pointers https://code.sololearn.com/cCqU501ZrxKt/?ref=app
7 Réponses
+ 12
I would suggest you to reconsider the structure to represent the data in an object-oriented way as we rarely need to go beyond 3D.
Otherwise, Tuple would be a great choice too! 😉
+ 12
In that case you can just create a 5D array and fill it up. That means you'll have something like this:-
int[,,,,] arr = new int[1,2,3,4,5];
But I wouldn't recommend it as multidimensional array was known to cause performance issue, so please use it wisely. 😉
+ 11
Would you mind to share with us the format of the data you're referring to?
You can mask the sensitive info or replace with dummy values.
+ 1
unfortunately, it has to be in that form, otherwise I would do that.
+ 1
I have to use the elements from data, how could I do that
+ 1
it's marks from a test, out of 1000. Can't tell you the format.
0
Samuel send me your contact and this is mine +233555152349