Wednesday, 7 August 2013

How to check if array is allready sorted

How to check if array is allready sorted

so how to make such logic
int[] arr = {2, 5, 3};
if (//arr is sorted)
....
else
...
Its bad that method Array.sort is void

No comments:

Post a Comment