People are not born with the ability of a Djikstra or whomever you idolize. It takes decades of diligent practice to get to that point.
Do not feel down about feeling stupid or inadequate, just keep working in a reasoned manner towards your goal.
You will get there.