#include <bits/stdc++.h>
using namespace std;
string s;
int A[300005];
signed main() {
  int t;
  scanf("%d", &(t));
  int n;
  while (t--) {
    scanf("%d", &(n));
    for (int i = 0; i < n; i++) scanf("%d", &(A[i]));
    bool flag = 1;
    for (int i = 0; i < n; i++) {
      if (A[i] < i && A[i] < n - 1 - i) {
        puts("No");
        flag = 0;
        break;
      }
    }
    if (!flag) continue;
    bool g = 0;
    for (int i = 0; i < n; i++) {
      if (g == 0 && A[i] < i && A[i] >= n - 1 - i) {
        g = 1;
        if (A[i - 1] <= n - 1 - i) {
          puts("No");
          flag = 0;
          break;
        }
      } else if (g && A[i] < n - 1 - i) {
        puts("No");
        flag = 0;
        break;
      }
    }
    if (flag) {
      puts("Yes");
    }
  }
}
