Possibly. Though maybe memorizing is where their skill development is focused (like with Leetcode). Yet they'll test better than a candidate who could tell you 50% of that, off-the-cuff, based on their understanding and insights from experience. The latter candidate is probably much stronger at the job than the memorize-the-test candidate.