A ball of mass `m` is projected horizontally with velocity `v` into the barrel of a spring gun of mass M initially at rest on a frictionless table. The mass `m` sticks in the barrel at the point of maximum compression of the spring. What fraction of the initial energy of the ball is stored in the spring ?
[Hint : Apply energy conservation principal to the system to obtain the maximum work done on the spring which is stored as potential energy of the spring. The spring will be progressively compressed till the two acquire a common velocity]