A 500 g block slides along a frictionless surface at a speed of $0.35 \mathrm{m} / \mathrm{s} .$ It runs into a horizontal massless spring with spring constant $50 \mathrm{N} / \mathrm{m}$ that extends outward from a wall. It compresses the spring, then is pushed back in the opposite direction by the spring, eventually losing contact with the spring.
a. How long does the block remain in contact with the spring?
b. How would your answer to part a change if the block's initial speed were doubled?