#include <bits/stdc++.h>
using namespace std;
vector<map<int, int>> adj;
vector<vector<int>> ver;
vector<bool> storage;
void Solve() {
  int n;
  cin >> n;
  vector<int> vec(n);
  int pr = n;
  for (int i = 0; i < n; ++i) {
    cin >> vec[i];
    if (pr == n && vec[i] < i) pr = i;
  }
  --pr;
  int sf = -1;
  for (int i = n - 1; i >= 0; --i) {
    if (vec[i] < n - i - 1) {
      sf = i;
      break;
    }
  }
  ++sf;
  if (sf <= pr)
    cout << "Yes\n";
  else
    cout << "No\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) Solve();
}
