Came to know today that it is QR decomposition that is used to solve least square problem

e = Y – A *beta

You decompose A in to QR

Multiply the equation by Qtranspose

Results in very simple equations t(Q)*Y = t(Q)*(QR)*beta = Q*beta 

Nobody every told me that this is how it happens at the implementation level.

Well I guess these things you have to figure out for yourself!!!