Dear student
law of conservation of momentum is valid for all type of collision weather it is elastic or inelastic .
as momentum of a system changes when only external forces acts on it . so either collision is elastic or in elastic external forces acted upon system is zero always so momentum is also conserved .