This question arose from the discussion in the comments of this answer.
First, let's say it's quite difficult to define what out-of-order is. Taking the example Pavel Shved gave, in the list [1,5,10,2,3,4,5,6,7,8,9,10,11] we can "clearly" see that 5 and 10 (indices 1 and 2) are out of order. But a naïve algorithm that simply checks some kind of sorted list invariant would not point those out.
checking
a[i-1]<=a[i] for all 0<i<=N
would yield the element at index 3 (which is 2);checking
a[j]<=a[i] for all 0<=i<=N and 0<=j<=i
would yield all elements in indices 3 to 12;
My question is: can you think of an algorithm to solve this problem that yields the "correct answer" (i.e. indices 1 and 2)? If so, under what time and memory complexity would it run?