Consider the following example:
A bullet of mass 45g is fired at a speed of 220 m/s into a 5.0 kg sandbag hanging from a string from the ceiling. The sandbag absorbs the bullet and begins to swing. To what maximum vertical height will it rise? (Assuming negligent air resistance and heat loss due to friction)
The way to solve this would be to calculate the kinetic energy of the bullet and then convert it to gravitational potential energy of the bullet + sandbag.
$$E_{k} = \frac12 * 0.045\,{\rm kg} * (220\,{\rm m/s})^2=1089\,{\rm J}$$
We could then find the gravitational potential energy here by substituting in $E_{p} = E_{k}$.
But, what I'm curious about here is, what would be the speed immediately after the bullet impacts the sandbag? Either the kinetic energy, or the momentum could be conserved, but not both.
$$P = 0.045\,{\rm kg} * 220 \,{\rm m/s} = 9.9 \,{\rm kg} \cdot \,{\rm m/s}$$
Then we find the speed after the collision of the sandbag + bullet to be:
$$9.9 \,{\rm kg} \cdot \,{\rm m/s} = 5.0\,{\rm kg} + 0.045\,{\rm kg} * X \,{\rm m/s}\to 1.96234 \,{\rm m/s} = X$$
So if momentum is conserved then the kinetic energy would be:
$$E_{k} = \frac12(5.0\,{\rm kg} + 0.045\,{\rm kg}) * (1.96324 \,{\rm m/s})^2=9.72\,{\rm J}$$
Should this question specifically state whether momentum or energy was conserved? How can you tell which one will be conserved?