Python solution for the problem


#1
class Solution:
def subUnsort(self, A):
    b=sorted(A)
    L = [ i for i in range(A.__len__()) if A[i]!=b[i] ]
    return ([-1] if(A==b) else ([min(L),max(L)]))