A Fast Algorithm for Ill-posed Linear Inverse Problems