* Example:
Input: arr[] = [-3, 9, 11, 20, 17, 5, 1]
Output: YES

Input: arr[] = [5, 6, 7, 8, 9, 10, 1, 2, 11]
Output: NO

I tried with method but its throwing error as list index out of range.
And also do i need to increment 'i' in every iteration?

```
def checkType(arr,n):
  for i in range(len(arr)):
    #print(i)
    if (arr[i]<=arr[i+1]): #and (arr[n-1]<=arr[n-2]):
      print('YES')
    else:
      print('NO')
if __name__ == "__main__" :
  arr=[-3, 9, 11, 20, 17, 5, 1]
  n=len(arr)
  checkType(arr,n)

```

IndexError: list index out of range