Optimal Quadratic Programming Algorithms