I can work on coding projects in a hyperfocus state for hours if I find it interesting. That is one of my strengths I would say.
Doing Leetcode religiously though, not so much.
https://news.ycombinator.com/item?id=20293259
Alan Carter described ADHD as a power for programming in 2000 for me.
https://www.datapacrat.com/Opinion/Reciprocality/add.html
My opinion is that ADHD is a tangle of questions that a person needs to understand. It may take half of his life, but the second half of his life will be excellent. Some people do not see those problems and inconsistencies in themselves that are visible to others and manifest as ADHD.
Look, I don’t want to be disrespectful but maybe you don’t have ADHD. From the accounts I have read online, adults with ADHD have a _reaaaaaally_ hard time focusing on anything. Like stopping sentences midway to chase butterflies. I find it utterly incompatible with being an engineer. So it’s not like you can’t focus (you said yourself), it’s that you don’t want to focus.
Truth is everybody has a much harder time focusing on shitty half-baked non-testable legacy software than on greenfield interesting stuff.
My former boss used to say: “remember, if you enjoy it, it’s not work”. It’s a bit effed up to be honest, but if you aspire to go to FAANG and be paid $250k+, you may have to agree to sweat a little.