Collision with Spring System

Questions where a collision is followed by or involves spring compression/extension, requiring combined use of momentum conservation and energy methods to find spring constant or compression.

jee-main 2005 Q20 View
The block of mass $M$ moving on the frictionless horizontal surface collides with a spring of spring constant K and compresses it by length L. The maximum momentum of the block after collision is
(1) $\sqrt{\mathrm{MK}}\,\mathrm{L}$
(2) $\frac{\mathrm{KL}^2}{2\mathrm{M}}$
(3) zero
(4) $\frac{ML^2}{\mathrm{K}}$
jee-main 2012 Q5 View
Two bodies $A$ and $B$ of mass $m$ and $2m$ respectively are placed on a smooth floor. They are connected by a spring of negligible mass. A third body $C$ of mass $m$ is placed on the floor. The body $C$ moves with a velocity $v_{0}$ along the line joining $A$ and $B$ and collides elastically with $A$. At a certain time after the collision it is found that the instantaneous velocities of $A$ and $B$ are same and the compression of the spring is $x_{0}$. The spring constant $k$ will be
(1) $m\frac{v_{0}^{2}}{x_{0}^{2}}$
(2) $m\frac{v_{0}}{2x_{0}}$
(3) $2m\frac{v_{0}}{x_{0}}$
(4) $\frac{2}{3}m\left(\frac{v_{0}}{x_{0}}\right)^{2}$