what a hard algorithm