On the algebraic structure of a class of solvable quantum problems