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.
Why I studied full-time for 8 months for a Google interview
Googley as Heck

This is what Barb Oakley talks in the Series Learning How to Learn on Coursera