how to efficiently compare 2d array in c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DeathFrag
    New Member
    • Feb 2008
    • 12

    how to efficiently compare 2d array in c#

    i have two 15 X 15 arrays. what can be the efficient way to compare the equality of both the arrays..i dont want to use nested "for" loops..which is very slow...i want somethin efficient..
  • vanc
    Recognized Expert New Member
    • Mar 2007
    • 211

    #2
    Originally posted by DeathFrag
    i have two 15 X 15 arrays. what can be the efficient way to compare the equality of both the arrays..i dont want to use nested "for" loops..which is very slow...i want somethin efficient..
    The only way to compare two array is to go through all elements. I don't think you can do anything else but there is some rules of those arrays. If those arrays are sorted then it is different, or all elements are unique then you can do something about it.

    Cheers.

    Comment

    Working...