Try thinking of this as a "classic" sliding block crashing into a compression spring. The block will deflect the spring until the KE is absorbed by the spring work:
k= spring constant (force per unit deflection distance) (remember F=kx?)
x = spring deflection from initial free position
Once the spring has absorbed the KE, it will be deflected, and will exert a force on the block and bounce it back.
Once this makes sense to you, substitute the cantilevered rod for the spring.
The collision will be mostly elastic, unless the rod experiences permanent deformation. Some energy is always lost due to friction.