If you don't know the syntax look it up in the text. If you want a longer explanation or just another explanation of something look that topic up in the text. Most students learn best by studying frequently. If you want to become a professional computer scientist and do well in your other courses you need to get an A or B in this course. If you aren't getting A's and B's you need to study more or ask for help.
Some students think more quickly than others.
Many excellent computer scientists and programmers think slowly and deliberately. What's important is that you focus, try different approaches, remember what works and what doesn't and keep at it until you get a workable solution. Don't just try to solve the problem.