Is it wracking my brain or racking my brain?
The spelling 'rack' is now used in all senses except for the seaweed called wrack. So it's "rack and ruin," … "racking my brains," and so on. Some other usage guides provide a way of dealing with this question that has a certain brutal charm: just stop using the word wrack.
What does it mean to rack your brains?
to try very hard to remember something or to solve a problem. I've racked my brain, but I just can't remember his name. Synonyms and related words. To memorize something, or to try to remember something.