Squeezing A Spring

The block of mass $$m$$ moving on a frictionless horizontal surface collides with the spring of spring constant $$k$$, compresses it by length $$L,$$ and then rebounds. What is the maximum momentum of the block after it loses contact with the spring?

×