#include <bits/stdc++.h>
using namespace std;
int solve() {
  long long n, r = 0;
  cin >> n;
  long long l = n;
  vector<long long int> a(n);
  for (long long int i = 0; i < n; i++) cin >> a[i];
  for (long long int i = 0; i < n; i++)
    if (a[i] >= i)
      continue;
    else {
      l = i - 1;
      break;
    }
  for (long long int i = n - 1; i > -1; i--)
    if (a[i] >= n - 1 - i)
      continue;
    else {
      r = i + 1;
      break;
    }
  cout << (l >= r ? "YES\n" : "NO\n");
  return 0;
}
int main() {
  auto start = chrono::high_resolution_clock::now();
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long test_cases = 1;
  cin >> test_cases;
  while (test_cases--) solve();
  auto stop = chrono::high_resolution_clock::now();
  auto duration = chrono::duration_cast<chrono::milliseconds>(stop - start);
}
