#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    long long a[n];
    bool flag = true;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int l = 0, r = (n - 1), num = 0;
    while (l <= r) {
      if ((l + 1) == r) {
        if ((a[l] >= num && a[r] >= (num + 1)) ||
            (a[l] >= (num + 1) && a[r] >= num)) {
          break;
        } else {
          flag = false;
        }
      }
      if (a[l] >= num) {
        a[l] = num;
      } else {
        flag = false;
      }
      if (a[r] >= num) {
        a[r] = num;
      } else {
        flag = false;
      }
      l++;
      r--;
      num++;
    }
    cout << (flag ? "YES" : "NO") << endl;
  }
  return 0;
}
