Solving the Least Squares Problem via reduced QR factorization by Gram-Schmidt and by Householder triangularization.