#include <bits/stdc++.h>
const int INF = 1 << 29;
using namespace std;
bool solve(vector<int> v, int n) {
  int l = -1, r = n;
  for (int i = 0; i < n; i++) {
    if (v[i] < i) break;
    l = i;
  }
  for (int j = n - 1; ~j; --j) {
    if (v[j] < n - j - 1) break;
    r = j;
  }
  return (r <= l);
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  ;
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> v(n);
    for (int &it : v) cin >> it;
    cout << (solve(v, n) ? "YES" : "NO") << '\n';
  }
  return 0;
}
