A block of mass m is moving with an initial velocity v0 towards a stationary spring of stiffness k attached to the wall as shown in figure