❇ jump-game-viiy👌 🏆O(N)❤️ Javascript🎯 Memory👀 80.77%🕕 ++Explanation✍️ 🔴🔥 ✅ 👉 💪🙏
Time Complexity: O(N)\nSpace Complexity: O(N)\n\n\nvar canReach = function (str, minJump, maxJump) {\n    const queue = [0];\n    for (let index = 1; index < st
Time Complexity: O(N)\nSpace Complexity: O(N)\n\n```\nvar canReach = function (str, minJump, maxJump) {\n    const queue = [0];\n    for (let index = 1; index < str.length; index++) {\n        if (str[index] === \'1\') {\n            continue;\n        }\n        while (queue.length && index - queue[0] > maxJump) {\n            queue.shift();\n        }\n        if (queue.length === 0) {\n            return false;\n        }\n        if (index - queue[0] < minJump) {\n            continue;\n        }\n        queue.push(index);\n        if (index === str.length - 1) {\n            return true;\n        }\n    }\n    return false;\n};\n```\n![image](https://assets.leetcode.com/users/images/7d605e3a-6e76-4e5e-984c-ac1e79bf2512_1716554538.7920306.png)\n
['JavaScript']