Speaking as a hiring manager, how long it's taken someone to learn something in the past has only ever figured into things when there wasn't a full fit between their skills (as interviewed) and what we're needing.
I've never looked at how long someone was in college, and honestly don't care if it took them 4 years or 10. I assume there's a reason it took them 10, and that could be lighter class load, a change in major, or all manner of things. If it's because they took every class 2-3x, because the first time it didn't stick, it'll show up in the interview process that they can't pick things up quickly, and I can do what I want with that information.
But to the grandparent's point, if I gave a leetcode problem (I don't), and someone immediately coded the ideal solution effortlessly, which tells me they have seen that problem recently, I'm not going to just be like "yep, hire this person, they're clearly a great engineer!" They're great and/or lucky at test prep, which is not the skill I care about.