#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, i, j, k;
  cin >> t;
  while (t--) {
    long long int n, n1, n2;
    cin >> n;
    long long int a[n], b[n], c[n];
    for (i = 0; i < n; i++) {
      cin >> a[i];
      c[i] = a[i];
      b[i] = a[i];
    }
    long long int pre = 0, post = 0, i1 = 0, j1 = (n - 1), i2, j2, count1 = 0,
                  count2 = 0;
    while (i1 < n && j1 >= 0) {
      count1 = 0;
      count2 = 0;
      if (a[i1] >= pre && i1 <= (n - 1) && (i1 == 0 || (i1 - i2) == 1)) {
        c[i1] = pre;
        i2 = i1;
        count1++;
      }
      if (a[j1] >= post && j1 >= 0 && (j1 == (n - 1) || (j2 - j1) == 1)) {
        b[j1] = post;
        j2 = j1;
        count2++;
      }
      pre++;
      post++;
      if (i1 < (n - 2)) i1++;
      if (j1 > 0) j1--;
      if (count1 == 0 && count2 == 0) break;
    }
    if ((j2 - i2) <= 0)
      cout << "Yes"
           << "\n";
    else if ((j2 - i2) == 1) {
      if ((a[j2] == a[i2]) && (b[j2] == c[i2]))
        cout << "No"
             << "\n";
      else
        cout << "Yes"
             << "\n";
    } else
      cout << "No"
           << "\n";
  }
  return 0;
}
