#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    long long a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int l = 0, r = n - 1;
    for (int i = 0; i < n; i++) {
      if (a[i] >= i)
        l = i;
      else
        break;
    }
    for (int j = n - 1; j >= 0; j--) {
      if (a[j] >= n - 1 - j)
        r = j;
      else
        break;
    }
    if (l >= r)
      cout << "YES";
    else
      cout << "NO";
    cout << endl;
  }
}
