C++ easy solution O( n ) | No DP | No Recursive Method | using Set
\nclass Solution {\npublic:\n    bool canReach(string s, int minJump, int maxJump) {\n        int i=0;\n        int j=1;\n        set<int>st;\n        int n=s.l
```\nclass Solution {\npublic:\n    bool canReach(string s, int minJump, int maxJump) {\n        int i=0;\n        int j=1;\n        set<int>st;\n        int n=s.length()-1;\n        if(s[n]==\'1\')\n            return false;\n        while(j<=n)\n        {\n            if(s[j]==\'0\'){\n            int c1=i+minJump;\n            int c2=min((i+maxJump),n);\n            if(c1<=j and j<=c2 )\n            {\n                i=j;\n                int maxi=max(c1,c2);\n                if(maxi<=n)\n                    st.insert(maxi);\n            }\n            }\n            j++;\n        }\n        for(auto k:st)\n            if(k==n)\n                return true;\n    \n        return 0;\n    }\n};\n```
['C', 'Ordered Set']