Acoustic full-waveform inversion in geophysical and medical imaging