✅✅Faster ||  Easy To Understand || C++ Code
Using BFS\n\n Time Complexity :- O(N)\n\n Space Complexity :- O(N)\n\n\nclass Solution {\npublic:\n    bool canReach(string str, int minJump, int maxJump) {\n  
* ***Using BFS***\n\n* ***Time Complexity :- O(N)***\n\n* ***Space Complexity :- O(N)***\n\n```\nclass Solution {\npublic:\n    bool canReach(string str, int minJump, int maxJump) {\n        \n        int n = str.size();\n        \n        // declare a queue\n        \n        // queue will store no. of reachable index having value as \'0\'\n        \n        queue<int> q;\n        \n        // base case\n        \n        q.push(0);\n        \n        // we are taking a variable farthest_reach to avoid duplicate work, no need to push the index again into queue, which we have already pushed into queue\n        \n        int farthest_reach = 0;\n        \n        while(!q.empty())\n        {\n            int i = q.front();\n            \n            q.pop();\n            \n            for(int j = max(i + minJump, farthest_reach + 1); j <= min(i + maxJump, n - 1); j++)\n            {\n                if(str[j] == \'0\')\n                {\n                    // if we have reached (n - 1)th index\n                    \n                    if(j == n - 1)\n                        return true;\n                    \n                    // push the index into queue\n                    \n                    q.push(j);\n                }\n            }\n            \n            // upadate the farthest_reach\n            \n            farthest_reach = i + maxJump;\n        }\n        \n        return false;\n    }\n};\n```
['Breadth-First Search', 'Queue', 'C']