rack brains vs run up a flagpole

rack brains

run up a flagpole

How often have the words rack brains and run up a flagpole occurred in a corpus of books? (source: Google Ngram Viewer )