She's quick-witted and immediately thought of a solution.
Tips
usage
机灵 is colloquial and positive, describing someone (often a child) who is clever and quick to react. Compare with 聪明 which is more general intelligence.
memory
A clever machine (机) spirit (灵) — someone whose mind works like a well-oiled machine.