#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int left = 0;
  int right = n - 1;
  for (int i = 0; i < n; i++) {
    if (a[i] >= i)
      left = i;
    else
      break;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] >= n - i - 1)
      right = i;
    else
      break;
  }
  if (left >= right)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
