#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
int a[N];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, fl = 0, vis = -1, up = 1;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (fl == 0) {
        if ((a[i] < i)) {
          up = 0;
          if (vis == n - 1 - i) fl = 1;
        }
        if (up == 1) {
          if (a[i] < i) fl = 1;
        } else {
          if (a[i] < n - 1 - i) fl = 1;
        }
      }
      vis = a[i];
    }
    if (n == 1)
      puts("YES");
    else {
      if (fl == 0)
        puts("YES");
      else
        puts("NO");
    }
  }
}
