Finite element algorithms for contact problems