#include <bits/stdc++.h>
using namespace std;
const int max_size = 3e5 + 100;
const int mod = 1e9 + 7;
const long long dis = 2e16;
long long a[max_size];
int main() {
  ios_base::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> a[i];
    if (n == 1) {
      cout << "Yes" << endl;
      continue;
    }
    bool vis[n + 5][2];
    memset(vis, 0, sizeof(vis));
    vis[0][0] = 1;
    vis[n - 1][1] = 1;
    for (int i = 1; i < n; i++) {
      vis[i][0] = (a[i] >= i) & vis[i - 1][0];
      vis[n - 1 - i][1] = (a[n - 1 - i] >= i) & vis[n - i][1];
    }
    bool check = 0;
    check = (a[0] >= n - 1) && vis[1][1];
    check |= (a[n - 1] >= n - 1) && vis[n - 2][0];
    for (int i = 1; i < n - 1; i++) {
      check |= (a[i] >= max(i, n - i - 1)) & vis[i - 1][0] & vis[i + 1][1];
    }
    if (check)
      cout << "Yes";
    else
      cout << "No";
    cout << endl;
  }
}
