#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, num[350004], count = 0;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> num[i];
    if (n == 1)
      cout << "YES\n";
    else {
      for (int i = 0; i < n; i++) {
        if (i < n / 2) {
          if (num[i] < i) count = 1;
        } else {
          if ((num[i] < n - i - 1) ||
              ((num[n / 2 - 1] == num[n / 2]) && (num[n / 2] == n / 2 - 1)))
            count = 1;
        }
      }
      if (count == 0)
        cout << "YES\n";
      else
        cout << "NO\n";
    }
    count = 0;
  }
  return 0;
}
