BUG lower space complexity of estimate_bandwidth to linear

Previously quadratic, see #2613.