#include <bits/stdc++.h>
using namespace std;
int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int& i : a) cin >> i;
    int p, q;
    for (p = 0; p < n; p++) {
      if (a[p] < p) {
        p--;
        break;
      }
    }
    for (q = n - 1; q >= 0; q--)
      if (a[q] < n - q - 1) {
        q++;
        break;
      }
    cout << (p >= q ? "YES\n" : "NO\n");
  }
}
