Easy C++ Solution || Easy To Understand 🔥🔥🔥
Complexity\n- Time complexity: O(N*N)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(1)\n Add your space complexity here, e.g. O(n) \n\n# 
# Complexity\n- Time complexity: O(N*N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    bool canReach(string s, int minJump, int maxJump) {\n        for (int i = 0, j = 0; i < s.size(); ++i)\n            if (i == 0 || s[i] == \'2\')\n                for (j = max(j, i + minJump); j <= min((int)s.size() - 1, i + maxJump); ++j)\n                    if (s[j] == \'0\')\n                        s[j] = \'2\';\n        return s[s.size() - 1] == \'2\';\n    } \n};\n```![image.png](https://assets.leetcode.com/users/images/05b04280-21c8-46c8-83ec-c3e2b0e085fb_1694077342.2801075.png)
['String', 'C++']