Algorithms for Direct and Inverse Scattering