A string of length L and mass M hangs freely from a fixed point. Then the velocity of transverse waves along the string at a distance x from the free end is

(1) $\sqrt{gL}$

(2) $\sqrt{gx}$

(3) gL

(4) gx