Programming is about solving problems, a good tecnique is to split the big problem in small ones to focus on each problem in a better way, you can use pseudocodes in a program or in a simple paper.
The most important point is this: practice. An algorithm is nothing more than an ordered and finite set of operations that we carry out for the sole purpose of finding a solution to a problem. So try to practice simple problems to get a better logic.
3. Learn about Data Structures and Algorithms
Learning about structures will give you a better plan to focus your problems and have an efficient software. You can play games like Chess and practice Mathematics.
4. Learn programming paradigms
A very good point is to learn programming paradigms. Probably one of the most programming paradigm is the The Object-Oriented Paradigm (OOP). A programming paradigm is like a blueprint to follow to create our projects. You can learn Functional Programming to learn how you can develop programs and solve problems in a different way.
5. Look at other people’s code
In programming we have many ways to solve problems, maybe another person solved the problem that you have in an optimal and simple way. Looking at other people’s minds is essential to advance as a programmer. You have Github to see a lot of great projects.