#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
int a[N];
int main() {
  int t, n;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    bool vis[4] = {0};
    int maxn = 0, p = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      int d = a[i] - a[i - 1];
      if (i > 1) {
        if (d > 0)
          vis[1] = 1;
        else if (d < 0)
          vis[2] = 1;
        else
          vis[0] = 1;
      }
    }
    if ((vis[1] && !vis[2] || !vis[1] && vis[2]) && !vis[0])
      cout << "YES" << endl;
    else if ((!vis[1] && !vis[2]) && vis[0]) {
      if (n % 2 == 0) {
        if (a[1] >= n / 2)
          cout << "YES" << endl;
        else
          cout << "NO" << endl;
      } else {
        if (a[1] >= (n - 1) / 2)
          cout << "YES" << endl;
        else
          cout << "NO" << endl;
      }
    } else {
      int ff = 0;
      if (n % 2 == 0) {
        if (a[n / 2] == a[n / 2 + 1]) a[n / 2]--;
      }
      for (int i = 1; i <= n; i++) {
        if (a[i] < min(i - 1, n - i)) ff = 1;
      }
      if (ff)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    }
  }
  return 0;
}
