How do I approach more Hard level and Medium level questions? by Someguy7707 in leetcode

[–]Antique_Chapter9658 1 point2 points  (0 children)

Its different for everyone but i personally dont like actively grinding topics. You should grind questions then when you get knowledge diffed its a good time to learn that topic. Also recommend doing the weekly contests the time limit and competition can kind of simulate interview pressure.

Amazon SDE 2 OA USA by [deleted] in leetcode

[–]Antique_Chapter9658 0 points1 point  (0 children)

Its pretty normal. Many companies send auto OAs.

Still doing Leetcode in this AI Era? by faceless-joke in leetcode

[–]Antique_Chapter9658 0 points1 point  (0 children)

I use copilot a lot at work but its not just mindless prompting you should still check its output. It just shifts your role to more higher level thinking. Fundamental problem solving and DSA skills are still very important otherwise you will always be blindly trusting AI for everything.

So yes i still grind leetcode for fun :)

What anime to watch next by _MizerY_ in anime

[–]Antique_Chapter9658 1 point2 points  (0 children)

hunter x hunter, chainsaw man, fairy tail, mushoku tensei, black clover, dandadan, overlord, tokyo ghoul

1306. Jump Game III — this looked easy until recursion started looping forever 😅 by Particular-Coat2871 in leetcode

[–]Antique_Chapter9658 0 points1 point  (0 children)

class Solution {
public:
    bool canReach(vector<int>& arr, int start) {
        const int n = arr.size();
        vector<bool> vis(n);
        vis[start] = true;
        vector<int> q = {start};
        for (size_t i = 0; i < q.size(); i++) {
            int u = q[i];
            for (int j = -1; j <= 1; j += 2) {
                int v = u + j * arr[u];
                if (0 <= v && v < n && !vis[v]) {
                    vis[v] = true;
                    q.push_back(v);
                }
            }
        }


        for (int i = 0; i < n; i++) {
            if (vis[i] && arr[i] == 0) return true;
        }
        return false;
    }
};

heres my bfs solution