#include <bits/stdc++.h>
using namespace std;
const int md = 1e9 + 7;
const int MX = 2e5 + 5;
const long long INF = 1e18;
const long double PI = 4 * atan((long double)1);
long long power(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n % 2) res *= a;
    a *= a;
    n /= 2;
  }
  return res;
}
long long abst(long long a) { return ((a < 0) ? (-1 * a) : (a)); }
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i];
    int f = 0, p = 1;
    int prev = -1;
    for (int i = 0; i < n; i++) {
      if (f == 0) {
        if (arr[i] >= (prev + 1))
          prev++;
        else {
          if (prev > (n - i - 1)) {
            prev = n - i - 1;
            f = 1;
            if (arr[i] < prev) {
              p = 0;
              break;
            }
          } else {
            p = 0;
            break;
          }
        }
      } else {
        prev = prev - 1;
        if (arr[i] < prev) {
          p = 0;
          break;
        }
      }
    }
    if (p)
      cout << "Yes\n";
    else {
      prev = -1;
      p = 1;
      f = 0;
      for (int i = n - 1; i >= 0; i--) {
        if (f == 0) {
          if (arr[i] >= (prev + 1))
            prev++;
          else {
            if (prev > (i)) {
              prev = i;
              f = 1;
              if (arr[i] < prev) {
                p = 0;
                break;
              }
            } else {
              p = 0;
              break;
            }
          }
        } else {
          prev = prev - 1;
          if (arr[i] < prev) {
            p = 0;
            break;
          }
        }
      }
      if (p)
        cout << "Yes\n";
      else
        cout << "No\n";
    }
  }
  return 0;
}
