one uniform draw plus one function inversion gives exact samples with no rejections and
O(1) cost; the hard requirement is an invertible CDF — the normal and gamma distributions have no closed-form inverse (use Box-Muller or numeric inversion such as the inverse erf), and the method is inherently 1-D and does not extend to high dimensions.