Keep working at it. Believe in yourself and your capabilities (as corny as it sounds). It really is about perseverance. If you find the frustration is wearing you down and making you feel hopeless, don't torture yourself doing work you don't want to do. With that said, if you feel a rush when things do click and that drives you, I think you'll do fine.
There are few prodigies in the field. Most people make it through sheer work ethic and self-belief. Do everything you can to hangout with other passionate people (if they're more skilled than you even better). The best way to do this is just get your foot in the door somewhere. Do whatever it takes. One year in a work environment gaining real world experience is priceless and your skills will skyrocket if you challenge yourself and step outside your comfort area.
Best of luck to you (whether you continue pursuing programming or something else)!
PS: For what it's worth, just understanding the above problem you described is half the battle. The other half is getting comfortable implementing different algorithms. For this, you can seriously just copy paste someone's solution from stack exchange and execute the code to observe the effects of your tweaks. It's kind of like how most people need to practice solving the math problems before being able to grasp the concepts behind the solution.
There are few prodigies in the field. Most people make it through sheer work ethic and self-belief. Do everything you can to hangout with other passionate people (if they're more skilled than you even better). The best way to do this is just get your foot in the door somewhere. Do whatever it takes. One year in a work environment gaining real world experience is priceless and your skills will skyrocket if you challenge yourself and step outside your comfort area.
Best of luck to you (whether you continue pursuing programming or something else)!
PS: For what it's worth, just understanding the above problem you described is half the battle. The other half is getting comfortable implementing different algorithms. For this, you can seriously just copy paste someone's solution from stack exchange and execute the code to observe the effects of your tweaks. It's kind of like how most people need to practice solving the math problems before being able to grasp the concepts behind the solution.