To cudgel one's brains Meaning, Definition & Usage

Definitions
  1. to exercise one's wits.

Webster 1913