message: Update jump-game-vii.cpp
diff: @@ -19,3 +19,26 @@ public:
  return dp.back();
  }
  };
  +
  +// Time: O(n)
  +// Space: O(n)
  +
  +// bfs solution
  +class Solution2 {
  +public:
  + bool canReach(string s, int minJump, int maxJump) {
  + queue<int> q({0});
  + int reachable = 0, i = -1;
  + while (!empty(q)) {
  + i = q.front(); q.pop();
  + for (int j = max(i + minJump, reachable + 1); j <= min(i + maxJump, int(size(s)) - 1); ++j) {
  + if (s[j] != '0') {
  + continue;
  + }
  + q.emplace(j);
  + }
  + reachable = i + maxJump;
  + }
  + return i == size(s) - 1;
  + }
  +};
  