A block of mass m hangs from a smooth light pulley and by an inextensible string fitted a spring of stiffness K as shown in case (a) and case (b). Find the period of oscillation of the block.