Impossible determination


#1

If all the values in array arr[j] are greater then the problem would be n^2. The solution is impossible to determine without the array bounds and conditions.


#2

Note that j is initialized only once in the snippet.