C# Array Maximum
Posted
by Betamoo
on Stack Overflow
See other posts from Stack Overflow
or by Betamoo
Published on 2010-05-28T20:12:50Z
Indexed on
2010/05/28
20:22 UTC
Read the original article
Hit count: 167
- I have 2 arrays named
Arr1
andArr2
in C#. They are of the exact same dimensions...
I need to get the element of Arr1 corresponding to maximum of elements in Arr2 beginning with given indices ...
e.g
Get indices of the max of Arr2 [ 1 , 10 , 3 , i , j ]
for all i
,j
Return Arr1 [ 1 , 10 , 3 , i , j ]
Of course I need the elegant solution (not the "loop for them" one...)
Please Note: I do not want to loop through the arrays, because it is 11 dimensional!!.. the code will be ugly and error prone.. and I may run out of variable names :)
© Stack Overflow or respective owner