Magnetic particle imaging (MPI) is a new imaging technique capable of imaging the distribution of superparamagnetic particles at high spatial and temporal resolution. For the reconstruction of the particle distribution, a system of linear equations has to be solved. The mathematical solution to this linear system can be obtained using a least-squares approach. In this paper, it is shown that the quality of the least-squares solution can be improved by incorporating a weighting matrix using the reciprocal of the matrix-row energy as weights. A further benefit of this weighting is that iterative algorithms, such as the conjugate gradient method, converge rapidly yielding the same image quality as obtained by singular value decomposition in only a few iterations. Thus, the weighting strategy in combination with the conjugate gradient method improves the image quality and substantially shortens the reconstruction time. The performance of weighting strategy and reconstruction algorithms is assessed with experimental data of a 2D MPI scanner.