If you pay attention to leetcode contests, most of them are unique enough that AI can't pass them, and there is a penalty for submitting a wrong solution, so a potential AI can't just brute force the problem (and if you've used GPT 4 you'll know it requires multiple attempts to get the right code)