#include <bits/stdc++.h>
using namespace std;
const int maxn = 300000 + 5;
int num[maxn];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
      scanf("%d", &num[i]);
    }
    int top = 0, tofl = 1;
    int bot = 0, bofl = 1;
    for (int i = 0; i < n; i++) {
      if (num[i] >= top && tofl)
        top++;
      else
        tofl = 0;
      if (num[n - 1 - i] >= bot && bofl)
        bot++;
      else
        bofl = 0;
      if (tofl == 0 && bofl == 0) break;
    }
    if (top + bot > n)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
