I know the basics of Java (sorting, searching, loops, and recursion), but I am not confident enough to solve algorithmic problems. Should I move on to data structures (linked list, stack, and queue) or solve more problems to learn more about the basics? Whenever I try to learn something new, I forget what I have already learned. How should I learn or plan my learning path?
I am not sure what you mean by “I forget what I have already learned”.
Did you mean that if you go and learn about lists you will forget about loops?
Not forget exactly, but it takes a while to recall in case of few algorithms, not with everything I study. If I practice few problems and again if I try to solve the same or similar questions after a week it will take time to get that logic or solution.
That sounds normal to me. You aren’t using this stuff everyday so of course it will require some time each time you encounter a problem, even one you solved before. If you had to write the same type of problem every day for a few weeks, it would probably become easier to recall it.
One trick btw to remember things is to teach those things to someone else. This forces you to use a different part of your brain to think about the problem and helps cement the concepts in. Find someone newer than you to help as you work on your own learning and that should work nicely to your favor.
Yes, It might take some more time and I will try to teach someone.
Shall I start learning data structures ? I have started with OOP’s basics.
sure. Normally people learn the basic JS commands and controls and then move on to data structures. That makes sense.