If I have 2 arrays how can that be compared in an infite loop ?
The longer the loop takes the more fruitful outcomes I can obtain, right ?
So tell me what is the payoff ?
Printable View
If I have 2 arrays how can that be compared in an infite loop ?
The longer the loop takes the more fruitful outcomes I can obtain, right ?
So tell me what is the payoff ?
Well, the question is very hard to understand, so I could only guess what OP meant. So some thoughts:
So, to compare them:
- Arrays *differ* is they have different length.
- Arrays *differ* if at least one element in the first array is not equal to any element in another array.
- compare the length
- if both have the same length - sort elements in both arrays and compare them per-element until the end of arrays or until the element will be different