do something off the top of one's head vs think on one's feet

do something off the top of one's head

think on one's feet

verb
  • When one is in the middle of a process, activity, or conversation, to adjust rapidly, effectively, and intelligently to new developments or changing circumstances. 

How often have the words do something off the top of one's head and think on one's feet occurred in a corpus of books? (source: Google Ngram Viewer )