Rack your brain.
[Idiom] RACK YOUR BRAIN. - Boost Your Problem-Solving Techniques
Think hard.
To "Rack your brain" means to think very hard or intensively about something. The metaphorical image is of putting your brain through a rack, stretching it to retrieve or figure out needed information or solve puzzles. It's a vivid description of deep mental engagement and concentration.
Example Sentences
I'm racking my brain.
I'm trying very hard to think of something.
She racked her brain for the perfect gift idea.
She is trying very hard to come up with the perfect gift idea.
I spent hours racking my brain to remember that old friend's name from high school.
I spent hours trying very hard to remember that old friend's name from high school.