#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 3e5 + 5;
int a[MAX_N];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    int l = n, r = 1;
    for (int i = 1; i <= n; i++) {
      if (a[i] < i - 1) {
        l = i - 1;
        break;
      }
    }
    for (int i = n; i >= 1; i--) {
      if (a[i] < n - i) {
        r = i + 1;
        break;
      }
    }
    if (l >= r)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
