
Spaced repetition is the key to memorization. Once you learn something, review it again later, and again even later. At each repetition, you reinforce your learning. Spending hours and hours at one time on priority queues won’t make you an expert. You become an expert by revisiting and reviewing over time. If you do so, you’ll get to the point where can’t forget details.
Being a developer means that you’re choosing a lifetime of learning new things. It’s a good idea to make peace with that right now. That doesn’t mean learn all the new things, but do be open to new things if you need to learn them …