Potential energy is independent of:
Potential energy is the energy possessed by a body by virtue of its position. Elastic potential energy also depends on the shape of the object. For example, a stretched rubber band possesses potential energy.
Thus, potential energy depends on the position, mass and shape of the object. It does not depend on the path taken by the object.