Max-min characterization of the mountain pass energy level for a class of variational problems